EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: alastairwalker on August 11, 2014, 08:19:00 AM



Title: Treegrid and rowstyler function
Post by: alastairwalker on August 11, 2014, 08:19:00 AM
I see that there is a rowstyler function for datagrid. I am using the treegrid, and need a function that will perform the same task.

Any suggestions as to how to implement such a function for treegrid?


Title: Re: Treegrid and rowstyler function
Post by: stworthy on August 11, 2014, 08:34:51 AM
The usage of 'rowStyler' function in treegrid is same as in datagrid. The code below shows how to use 'rowStyler' function in treegrid.
Code:
$('#tg').treegrid({
rowStyler:function(row){
if (row.persons == 2){
return 'background:#ccc'
}
}
})


Title: Re: Treegrid and rowstyler function
Post by: alastairwalker on August 12, 2014, 07:21:05 AM
Thank you very much!
Alastair