Deletes a record from the DataGrid control and its underlying data source.
DataGridObject.DeleteRecord(Row)
Newlook Smartclient
Newlook Server
This method will fail if the data grid control is not currently bound to a data source or the bound data source cannot be edited.
If the record is successfully found within the data source and deleted, the row will also be removed from the data grid control.
The DeleteRow method operates in a similar manner, however this method removes the row from the data grid control, and leaves the data source unaltered.
Removing a row using this method causes the row index of subsequent rows to change and the RowCount property for the grid.
Using this method with a DataGrid derived from a host subfile will generate a script error. This method can only be used with inserted DataGrids bound to an external data source.
Row (Integer, Required)
The row index of the record that is to be deleted. Note: the row index is a zero-based index.
Returns a Boolean indicating the success or failure of the action.
The following example deletes the current record from the datagrid and its underlying source: JSCRIPT:function DeleteCurrentRecord() {
} VB SCRIPT:Sub DeleteCurrentRecord
End Sub |
DeleteRow Method | DeleteColumn Method | AddRecord Method | InsertRow Method | InsertColumnArray Method | InsertColumn Method | RowCount Property | RowIndex Property
© 2004-2021 looksoftware. All rights reserved.