RC
Rajadurai C
Syncfusion Team
September 24, 2010 07:01 PM UTC
Hi Pavan,
Thanks for your interest in Syncfusion Products.
To prevent a cell focus getting moved away after modifying the content until any of the buttons placed in UI is clicked, you can handle the TableControlCurrentCellMoving event with the following code.
// Event Handler
this.gridGroupingControl1.TableControlCurrentCellMoving += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellMovingEventHandler(gridGroupingControl1_TableControlCurrentCellMoving);
// Method Invoked
void gridGroupingControl1_TableControlCurrentCellMoving(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellMovingEventArgs e)
{
if (e.TableControl.CurrentCell.IsModified)
e.Inner.Cancel = true;
}
As the button is placed in UI, the focus can be moved to button from the grid provided the CausesValidation property is set.
Regards,
Rajadurai