DataGrid.setDataSource

Overview | Methods | Fields | This Package | All Packages

DataGrid.setDataSource

Sets the data source underlying the DataGrid control.

Syntax

public void setDataSource( IDataSource dataSource )

Parameters

dataSource

An object implementing the IDataSource interface that exposes the recordset to be bound to the DataGrid control.

Remarks

A data source is an object that implements the IDataSource interface and exposes one or more recordsets, one of which will be bound to the DataGrid control. To specify which recordset is bound, call setDataMember.

Note   Because the ADO Recordset and DataSource components already implement the IDataSource interface, you can set the dataSource property directly to one of these components. In this case, you do not have to set the dataMember property.

See Also   getDataSource, getDataMember