VK
Vinoth Kumar K
Syncfusion Team
February 12, 2008 05:57 PM UTC
Hi Navaneeth,
Thanks for using Syncfusion Products.
By default, the grid datas should be updated to underlying datasource as you leave the row (not the cell). If you want the grid values updated as you leave the cell , you can add a CurrentRecordContextChange event handler, and call the Table.EndEdit method for the related table. This will update the underlying datasource if any changes is detected. Also you need to set the Table.TableDirty = true. This property indicates to the engine that it needs to re-categorize elements when the underlying datasource is updated. Below are the codes that shows this task.
private void grid1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if(e.Action == CurrentRecordAction.CurrentFieldChanged
|| e.Action == CurrentRecordAction.EndEditComplete )
{
this.grid.CurrencyManager.EndCurrentEdit();
e.Table.EndEdit();
e.Table.TableDirty = true;
}
}
Please try these code and let me know if this helps.
Best regards,
Vinoth