EasyUI Forum
September 13, 2025, 06:48:01 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: Datagrid - column header options  (Read 7714 times)
sguisse
Newbie
*
Posts: 8


View Profile
« on: June 25, 2016, 06:32:42 PM »

Hello,

I would like, if it's possible to have an exemple of how to extends the column properties to add "headerStyler" property
And then modify Header row rendering to use this new property.


Thanks in advance

NB : I evaluate jeasyui to see if it respond to the functionnalities we need (I use the minimized file of jeasyui 1.4.5)
   
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 26, 2016, 07:36:57 AM »

You can define the 'id' property for the cells of column header and then change its style. Please look at the code below:
Code:
$('#dg').datagrid({
  columns:[[
    {id:'id1',field:'f1',title:'title1',width:100},
    {id:'id2',field:'f2',title:'title1',width:100}
  ]]
});
$('#id1').css('background-color','#ccc')
Logged
sguisse
Newbie
*
Posts: 8


View Profile
« Reply #2 on: June 26, 2016, 02:03:40 PM »

If it's possible I prefer to get an exemple of my first request for performance issue.
The table contains a calendar by day and I don't know the number of days user could select (1;2;3;... years * 365 columns)

so If I know how to do these extension, I will be able to define the style at the same time the header is builded.

Thanks.
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!