Parameter | Description |
---|---|
sCurrentRowID (ByRef) | [In/Out] This is the row ID of the row being saved |
Return False to cancel the save action, otherwise return True. By default, this event returns True.
Function OnSaveRow String ByRef sCurrentRowID Returns Boolean
The OnSaveRow event is triggered when the grid receives a Request_Save. Usually, this is the result of a user-initiated save row. Implement this event to perform a manual save row action.
In a data aware grid (pbDataAware = True), OnSaveRow is triggered before the DataDictionary save operation. If OnSaveRow returns False, then the Data Dictionary save operation is not performed.
In a non-data-aware grid (pbDataAware = False), use OnSaveRow as your programming hook to perform the desired save row action. When saving a new row, the sCurrentRowID parameter can be changed to update the RowID of the newly created row.
If False is returned, the save action is cancelled and other columns in the row (e.g. calculated columns) are not updated.
The psValue and pbChanged properties can be queried on the column objects to fetch current values. Manipulating those properties will update the displayed record on the client.
Note that this event is not triggered on a row change when pbOfflineEditing is set to True.