EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: JPi on October 13, 2016, 09:13:00 PM



Title: Dynamic font color for table rows depeneding on specific value of a column
Post by: JPi on October 13, 2016, 09:13:00 PM
Hi,

I have a scenario where certain rows of datagrid need to have a color different than the remaining rows based on value of a specific column.

Eg . RollNo  Name   Age   FontRed
        23     Adam     10     X
        45     James     9     
        67     Lily        10     X

Since FontRed is for rows - Adam and Lily, only those 2 rows should have entire row font color as red else green. How can this be achieved ?

Thanks,
JPi


Title: Re: Dynamic font color for table rows depeneding on specific value of a column
Post by: stworthy on October 14, 2016, 12:06:25 AM
The 'rowStyler' function allows you to custom the row style. Please look at this example http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=DataGrid%20Row%20Style


Title: Re: Dynamic font color for table rows depeneding on specific value of a column
Post by: JPi on October 14, 2016, 02:20:56 AM
Thanks stworthy. I shall try it.