EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: arma on December 03, 2014, 04:18:59 AM



Title: Data Grid Row Hilight
Post by: arma 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.


Title: Re: Data Grid Row Hilight
Post by: stworthy 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>


Title: Re: Data Grid Row Hilight
Post by: arma 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