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
190
How to change row background color based on one of the column value on the load
posted

Hi,

I am using WebDataGrid 9.1 with C# 3.5, the below code is not working. The color Red appears briefly when I click on the grid for the very first time on the clicked cell and then never works again. Any help please?protected void wdgDetail_OnInitializeRow(object sender, RowEventArgs e){if (e.Row.Items[0].Value.ToString() == "CONVERTED"){e.Row.CssClass = "Class1";

e.Row.Items[0].CssClass = "Class1";

e.Row.Items[1].CssClass = "Class1";

e.Row.Items[2].CssClass =

"Class1";

e.Row.DataBind();}

here is the Class1 definition:

.Class1{background-color:Red;}