EasyUI Forum
May 01, 2024, 10:49:40 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: Data Grid Row Hilight  (Read 5201 times)
arma
Full Member
***
Posts: 110


View Profile
« on: December 03, 2014, 04:18:59 AM »

Hi,

I have set some column with custom background color using column styler property. When a row selected, it is missing row hilight color in the columns.
Is there a way to fix this ?

Thank you.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 03, 2014, 07:34:22 AM »

If you really want to let the cell style displaying behind the selected row, please return the 'class' name instead of the inline style in your 'styler' function. The code below shows how to achieve this functionality.
Code:
<style>
    .datagrid-row-over .c1{
        background:#eaf2ff;
    }
    .datagrid-row-selected .c1{
        background:#ffe48d;
    }
    .c1{
        background:#ffee00;
        color:red;
    }
</style>
<script type="text/javascript">
    function cellStyler(value,row,index){
        if (value < 30){
            return {class:'c1'};
        }
    }
</script>
Logged
arma
Full Member
***
Posts: 110


View Profile
« Reply #2 on: December 03, 2014, 03:28:57 PM »

Hi stworthy,

It works good eventho i should duplicating the css for each different column.

Thank you
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!