EasyUI Forum
May 18, 2024, 11:25:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Tooltip on datagrid cells  (Read 13605 times)
proceno72
Newbie
*
Posts: 39



View Profile
« on: May 08, 2013, 10:47:00 AM »

I create my datagrid on the fly with javascript code.
How can I apply new easyui tooltip plugin on datagrid cells?
Logged
joe
Newbie
*
Posts: 33


View Profile Email
« Reply #1 on: May 09, 2013, 10:45:12 PM »

formatter: function(value, row, index){ return '<span title=\"This is my tool tip.\" class=\"easyui-tooltip\">' + value + '</span>' }
Logged
proceno72
Newbie
*
Posts: 39



View Profile
« Reply #2 on: May 10, 2013, 03:58:52 PM »

Thanks joe. It works.
I found another way for this. It applies new easyui tooltip on every cell of specified datagrid.
This is the code:
Code:
var cells = $('#mygrid').datagrid('getPanel').find('div.datagrid-body td[field] div.datagrid-cell:not(:empty)');
cells.tooltip({
     position:'top',
     content: function() {
                var tp = $(this).html();
                return tp;
     } 
 });
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!