VGridControlBase.UpdateFocusedRecord() Method
Validates the focused record and saves its values to the data source.
Namespace: DevExpress.XtraVerticalGrid
Assembly: DevExpress.XtraVerticalGrid.v24.2.dll
Declaration
Returns
Type | Description |
---|---|
Boolean | true if the record has been updated; otherwise, false. |
Remarks
The UpdateFocusedRecord method raises the VGridControlBase.ValidateRecord event which allows you to specify whether the record’s values are valid. The event handler can leave focus within the record so that end-users can correct the record’s values. In this instance, the UpdateFocusedRecord method returns false. If focus is allowed to be moved but the record is marked as invalid, the VGridControlBase.InvalidRecordException event is raised.
If the record’s values have been accepted and saved, the UpdateFocusedRecord method returns true. This also occurs if the changes were discarded. In both instances, record focus is allowed to be moved.
The UpdateFocusedRecord method is automatically called when a record is about to lose focus. You can manually call this method to determine whether the focused record’s data is valid.