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-
Hello,
The styles have to be applied inline similar to the sample I've attached.
Please let me know if you have any questions regarding this matter.
To which file or how to add these styles? I pasted them in ig_datarid.css and they did not solve the problem.
Hello Al,
Thank you for posting on our forums. I will be happy to assist you with your question.
I recommend setting the styles as follows to prevent the background color style from overriding the selectedCell background color style:
tbody > tr > td.redbackground { background-color: #FF0000; background-image: none; background: #FF0000 none; color: #FFFFFF;}
tbody > tr > td.igg_SelectedCell { background-color: #9ECBD6 !important}