EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: LokeshN on April 19, 2012, 09:51:07 PM



Title: Treegrid - Not able to highlight/select a row with background color
Post by: LokeshN on April 19, 2012, 09:51:07 PM
I am not able to select/highlight a treegrid row which has background color.

I am setting the background color of a row through rowStyler option.

                     
Code:
    rowStyler:function(row){
        if(row['type'] == 'A'){
            return 'background-color:#C6FFC6;color:blue;';
        }
        else if(row['type'] == 'B'){
return 'background-color:#F7CFB5;color:blue;';
        }
    }
I also tried using the styler option in the column<th> still it did not work.
Any solution for this?


Title: Re: Treegrid - Not able to highlight/select a row with background color
Post by: stworthy on April 20, 2012, 02:03:14 AM
Please add the below css style to your page head:

Code:
<head>
<style type="text/css">
.datagrid-row-over td{
background:#D0E5F5;
}
.datagrid-row-selected td{
background:#FBEC88;
}
</style>
</head>


Title: Re: Treegrid - Not able to highlight/select a row with background color
Post by: LokeshN on April 20, 2012, 02:37:53 AM
Thanks much stworthy


Title: Re: Treegrid - Not able to highlight/select a row with background color
Post by: magicloud on July 22, 2013, 07:32:38 PM
Sorry, my mistake. Forgot everything in treegrid does not have index param.

---
Sorry to bring up this thread.

Does the answer mean rowStyler does not work for treegrid?

I want to give the user a visual feedback, for example, red row means "this row has been edited, please remember to click on "save all" button." I had a flag in rowData to indicate it has been edited. How to make it shown?