Home Forums WinForms controls Xceed Grid for WinForms Adding new row and editing it immidiately does not work Reply To: Adding new row and editing it immidiately does not work

User (Old forums)
Member
Post count: 23064

Funny, funny..

It seams that hen you call EnterEdit method, change the value of the cell, and click somewhere else in the grid, the cell still stays in the edit mode?!

If you edit the cell with the doubleclick, everything works ok…

So the solution for the problem is to make some coding in ValueChanged event:

private void celldataRowTemplate1naziv_ValueChanged(object sender, System.EventArgs e)
{
Xceed.Grid.DataCell sndr = (Xceed.Grid.DataCell)sender;
bool celledited = sndr.IsBeingEdited;
if (celledited==true) sndr.ParentRow.EndEdit();
}

Hope it helps somebody who comes to the same problem…

Imported from legacy forums. Posted by winabike (had 329 views)