Home Forums WinForms controls Xceed Grid for WinForms Changing cell backcolor based on data within Reply To: Changing cell backcolor based on data within

Xceed Support
Member
Post count: 5658

Using the DeactivatingControl event on the CellEditorManager, you can reproduce easily the same effect (of a user entering a data and the cell format changing).

<code>
private void Form1_Load( object sender, EventArgs e )
{
//…

foreach( Cell cell in dataRowTemplate1.Cells )
{
cell.CellEditorManager.DeactivatingControl += new CellEditorEventHandler( CellEditorManager_DeactivatingControl );
}
}

void CellEditorManager_DeactivatingControl( object sender, CellEditorEventArgs e )
{
//…
}
</code>

For the comments on the answers, if you scroll down and look at almost any other threads, you will likely see an answer from one of the Xceed employees.
It’s also important that this forum is “community-supported”.

Imported from legacy forums. Posted by CharlesB (had 3465 views)