AddRecord Method

Appends a blank row to a bound DataGrid and allows the user to begin editing the new record.

App.ActiveForm.DataGridObject.AddRecord()

Client support

   Newlook Smartclient only.

Parameters

None.

Use

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).

NOTE!

The ability to update the data source will depend on the access permissions specified in the connection string of the bound database or server.

ALERT!

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

Returns a Boolean indicating the success or failure of the action.

Applies To

DataGrid control

See Also

DataBind method | InsertColumn method | InsertColumnArray method | InsertRow method


© 2004-2021 looksoftware. All rights reserved.