New Product Launch - BoldDesk !
Introducing help desk ticketing software.
New Product LaunchBoldDesk: Help desk ticketing software starts at $10 for 3 agents.
Try it for free.private void grid_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e) { if(e.ColIndex > 0 && e.RowIndex > 0) { e.Style.CellValue = this.table.Rows[e.RowIndex-1][e.ColIndex-1]; e.Handled = true; if(e.ColIndex == 3) { double d; if(double.TryParse(e.Style.Text, System.Globalization.NumberStyles.Any, null, out d) && d > 30) { e.Style.BackColor = Color.Red; } } else if(e.ColIndex == 1) { double d; if(double.TryParse(this.grid[e.RowIndex, 3].Text, System.Globalization.NumberStyles.Any, null, out d) && d > 30) { e.Style.BackColor = Color.Red; } } } }One other thing, when you change teh value in column 3, you would want to make sure column 1 wa redrawn so it would reflect an y new color determined by the new value in column 3. You can do this in SaveCellInfo.
private void grid_SaveCellInfo(object sender, GridSaveCellInfoEventArgs e) { if(e.ColIndex > 0 && e.RowIndex > 0) { this.table.Rows[e.RowIndex-1][e.ColIndex-1] = e.Style.CellValue; e.Handled = true; if(e.ColIndex == 3) this.grid.Invalidate(grid.RangeInfoToRectangle(GridRangeInfo.Cell(e.RowIndex, 1))); } }