EasyUI Forum
April 30, 2024, 12:20:44 AM *
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 for DataGrid/TreeGrid column header and for the entire data row  (Read 7286 times)
jumple
Newbie
*
Posts: 4


View Profile Email
« on: May 08, 2014, 09:37:17 AM »

If columns are created programmatically, not with HTML - how can I add a "title" property for the TH tag or a custom tooltip for a column's header?
Also how can I add a "title" property or a custom tooltip for the entire data row in the grid?

Thanks
« Last Edit: May 08, 2014, 09:40:41 AM by jumple » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 08, 2014, 05:45:32 PM »

To set a title attribute for a column, wrap a '<span>' with title attribute.
Code:
$('#dg').datagrid({
  columns:[[
    {field:'f1',title:'<span title="tip information">Title1</span>',...}
  ]]
});
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!