EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: sguisse on June 25, 2016, 06:32:42 PM



Title: Datagrid - column header options
Post by: sguisse 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)
   


Title: Re: Datagrid - column header options
Post by: stworthy 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')


Title: Re: Datagrid - column header options
Post by: sguisse 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.