AD
Administrator
Syncfusion Team
November 21, 2004 04:41 PM UTC
1) As far as whether cell entries are the proper type (like trying to type ABC into a double cell), the grid''s default behavior is to do this validation on a cell by cell basis for you. So, in RowLeave, the row is always valid (except possibly for the last cell modified - but that will be validated as part of the RowLeave.)
Now if you want to do special validation (something other than the default system type checks), then you can do that is RowLeave. But the grid would not know whether the row was valid of not, you would have to add whatever code you needed to test whethee the row is valid.
2) To delete a record, you can try:
int pos = this.gridDataBoundGrid1.Binder.RowIndexToPosition(this.gridDataBoundGrid1.CurrentCell.RowIndex);
this.gridDataBoundGrid1.CurrentCell.EndEdit();
this.gridDataBoundGrid1.Binder.RemoveRecords(pos, pos);
3) You can handle the grid.ValidateFailed event. In the handler, you can set grid.CurrentCell.ErrorMessage to your string to see your message, or you can set it to the empty string to see no message from teh grid.