Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
alt row color when selected
posted

Hi,

How do you control the color of the selected row when you have changed the background-color of alternating items? I have set the alternating row color, but only the white row turns color when selected.

Here is what I have used for  alt color:

 

 

 

tbody tr.AltItemCssClass td

{

 

 

background-color: #dcdcdc;

}

Here is where I set the grid to do row selection, but changing the  Css class here hasn't helped me.

 

<Behaviors>

 

<ig:Selection CellClickAction="Row" RowSelectType="Single"

 

SelectedCellCssClass="SelectedRowCssClass">

 

<SelectionClientEvents RowSelectionChanged="whdgMap_RowSelectionChanged" />

 

</ig:Selection>

Thank you.

  • 2426
    Suggested Answer
    posted

    Hi,

    The grid uses a specific selector when applying styles to cells, try using this to be in step with what the grid is already doing:

     

     

     

     

    tbody>tr>td.selected
    {
        
    background-color:Red;

    }

     

     

    <ig:Selection SelectedCellCssClass="selected"></ig:Selection>

    I hope that helps.

    Aaron