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
218
Selected Row Color is not applied
posted

It is nessecary to alert the user of this web app that certain projects are locked, i.e. their data is complete and cannot be modified. I have boolean field in the datatable feeding the webdatagrid to that effect and this forum provided me with the solution:

in the ig_dataGrid.css

.redbackground
{
 background-color: #FF0000;
 background-image: none !important;
 background: #FF0000 none !important;
 color: #FFFFFF;
}

and in the code

Private Sub OPGrid_InitializeRow(sender As Object, e As Infragistics.Web.UI.GridControls.RowEventArgs) Handles OPGrid.InitializeRow
        If e.Row.Items.GetValue(8).ToString = "1" Then
            For i = 0 To e.Row.Items.Count - 1
                e.Row.Items(i).CssClass = "redbackground"
            Next i
        End If
    End Sub

This all works great but the selection of one these red rows does not apply the selected row style i.e. navy blue with white text. The selected row style DOES apply to all rows that are not red. I need the selected row style to apply to all rows when selected, red or not. Can you tell me how to achieve this?

Thanks

-Al-