Home Forums WinForms controls Xceed Grid for WinForms Forcing the datagrid to save edited data Reply To: Forcing the datagrid to save edited data

User (Old forums)
Member
Post count: 23064

Here is what I do.

if (InsertionRow.IsBeingEdited)
{
InsertionRow.EndEdit();
}

I do the same for all the datarows. Only one row can be edited at a time, so break after you find the first row being edited.

foreach(DataRow dRow in myGrid)
{
if (dRow.IsBeingEdited)
{
dRow.EndEdit();
break;
}
}

I know this is C#, but you get the picture.

Imported from legacy forums. Posted by MBonafe (had 486 views)