Home Forums WinForms controls Xceed Grid for WinForms Current Cell BackColor Reply To: Current Cell BackColor

User (Old forums)
Post count: 23064

If you say <i>cell = mGrid.CurrentCell</i>, isn’t <i>cell.IsCurrent</i> always true? I think you should call ResetBackColor on the previous CurrentCell, and change the BackColor of the new CurrentCell, something like this:<code>private Cell mCurrentCell = null;
protected void Grid_CurrentCellChanged(object sender, EventArgs e)
GridControl grid = sender as GridControl;
if (grid != null && mCurrentCell != grid.CurrentCell)
if (mCurrentCell != null) mCurrentCell.ResetBackColor();
mCurrentCell = grid.CurrentCell;
if (mCurrentCell != null) mCurrentCell.BackColor = _selectedColor;
}</code>I don’t know if this will solve your problem.

Imported from legacy forums. Posted by Tommy (had 224 views)