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.GetMulti(null); if (solvents.Count > 0){ uwg_Solvents.DataSource = solvents; uwg_Solvents.DataBind(); 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"); } } … Continue reading Conditional Formatting using UltraWebGrid
Infragistics
Remove the comma from WebNumericEdit
If you do not want to display the comma in the Infragistcs WebNumberic Edit control. //WebNumericEdit control will use a comma to seperate number groups //This will prevent 1234567 being displayed as 1,234,567 //Requires: using System.Globalization; NumberFormatInfo numInfo = new NumberFormatInfo(); numInfo.NumberGroupSeparator = ""; this.txt_Pfizer_id.NumberFormat = numInfo;
UltraWebGrid helper to find a column index based on the caption
In order to avoid WEAK typing ( i.e. e.Row.Cells[5] ) I have written a helper method to return the index of an Infragistics UltraWebGrid column based upon its caption text. This is probably best explained via an example: In this scenario a row in my SOLVENT search results has been clicked. I want to load … Continue reading UltraWebGrid helper to find a column index based on the caption