Appends a blank row to a bound DataGrid and allows the user to begin editing the new record.
App.ActiveForm.DataGridObject.AddRecord()
Newlook Smartclient only.
None.
The current row index will be changed to reflect the newly added row, allowing the user to edit the new record. The data grid control must be bound to a data source either statically via the ConnectionString and Source properties in Designer or dynamically via the DataBind method before this method can be called. In addition, the data source must be completely loaded before the user can add the record therefore this method will not return a value until all the data is loaded (which may take some time on large files).
The ability to update the data source will depend on the access permissions specified in the connection string of the bound database or server.
Using this method with a DataGrid derived from a host subfile will generate an error. This method can only be used with inserted DataGrids bound to an external data source.
Returns a Boolean indicating the success or failure of the action.
In the following example we are calling the AddRecord method to provide a new row for the user to edit for a grid that is already statically bound to an external data source. JSCRIPTfunction AddNewRecord() {
} |
DataBind method | InsertColumn method | InsertColumnArray method | InsertRow method
© 2004-2021 looksoftware. All rights reserved.