JS
Jeba S
Syncfusion Team
August 23, 2007 01:23 PM UTC
Hi James,
Thank you for your details.
You can avoid the NullReferenceException by lock and unlock the current cell. The Lock / Unlock blocks any changes to the active current cell.
Please refer this code snippets:
private void gridGroupingControl1_TableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e)
{
if (e.Inner.PopupCloseType == Syncfusion.Windows.Forms.PopupCloseType.Done && this.gridGroupingControl1.Table.CurrentRecord!=null)
{
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
cc.ConfirmChanges();
cc.Lock();
((GridTableControl)cc.Grid).Table.CurrentRecordManager.EndEdit();
e.TableControl.CurrentCell.EndEdit();
e.TableControl.Table.EndEdit();
cc.Unlock();
}
}
Kindly let us know if you need any further assistance.
Thank you for using Syncfusion Products.
Best Regards,
Jeba.