EasyUI Forum
June 25, 2024, 06:28:54 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 - Not able to highlight/select a row with background color  (Read 15635 times)
LokeshN
Newbie
*
Posts: 2


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


View Profile Email
« Reply #1 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>
Logged
LokeshN
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: April 20, 2012, 02:37:53 AM »

Thanks much stworthy
Logged
magicloud
Newbie
*
Posts: 9


View Profile
« Reply #3 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?
« Last Edit: July 22, 2013, 08:02:05 PM by magicloud » 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!