Conditional Formatting using UltraWebGrid

A code example of how to apply conditional formatting to cells in an Infragistics UltraWebGrid control using ASP.NET 2.0

private void populateSolvents(){
SolventsCollection solvents = new SolventsCollection();

(solvents.Count > 0){

uwg_Solvents.DataSource = solvents;

foreach (Infragistics.WebUI.UltraWebGrid.UltraGridRow row in uwg_Solvents.Rows.All)
if (row.Cells[1].Value.ToString() == "h2o")



row.Cells[1].Style.BackColor = System.Drawing.ColorTranslator.FromHtml("red");


} else

{ globalHelper.DoAlert("No Results to display", Page);



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s