Home Forums WinForms controls Xceed Grid for WinForms Virtual Mode and AddingDataRow Reply To: Virtual Mode and AddingDataRow

User (Old forums)
Member
Post count: 23064

Well, in that case, you can also use the ValueChanged event on the Cell class, and change the BackgroundColor in the event handler accordingly to the value of the cell.

e.g.:

private void Form1_Load( object sender, EventArgs e )

{

    dataRowTemplate1.Cells[

“ShipperID” ].ValueChanged += new EventHandler( Form1_ValueChanged );

}

void Form1_ValueChanged( object sender, EventArgs e )

{

    Cell cell = sender as Cell;

    if( cell != null )

    {

        if( ( int )cell.Value == 2 )

        {

            cell.ParentRow.BackColor =

Color.PeachPuff;

        }

    }

}

 

Imported from legacy forums. Posted by André (had 244 views)