AD
Administrator
Syncfusion Team
December 14, 2007 09:58 AM UTC
Normally, pressing a button will cause validation to occur on the previously focussed control. But if the button is on a toolbar or if the button has its CausesValidation property set false, then the validation of the previous control does not occur, and that control does not know to save it pending changes. One way around this problem is to add a call to
this.Validate();
at the beginning of your Apply button code. Here, 'this' refers to the Form holding the grid. This should work for any previous control, not just the GridGroupingControl.
If you do not want to force the validation using this.Validate(), then you could just try telling the grid to save its changes at the top of the Apply button code.
if (this.gridGroupingControl1.Table.CurrentRecord != null
&& this.gridGroupingControl1.Table.CurrentRecord.IsEditing)
{
this.gridGroupingControl1.Table.CurrentRecord.EndEdit();
}
Try using this code to catch shift+Tab.
void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
{
if (e.Inner.Shift && e.Inner.KeyCode == Keys.Tab)
this.Text = "Shift+Tab";
}