EasyUI Forum
September 13, 2025, 08:07:59 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: Treegrid and rowstyler function  (Read 10495 times)
alastairwalker
Newbie
*
Posts: 14


View Profile Email
« 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?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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'
}
}
})
Logged
alastairwalker
Newbie
*
Posts: 14


View Profile Email
« Reply #2 on: August 12, 2014, 07:21:05 AM »

Thank you very much!
Alastair
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!