Populate items from a data source.
[Visual Basic]
Public Sub DataBind()
[C#]
public
void DataBind();
Remarks
BaseNavigator controls can populate the whole control or individual group from the following data sources: DataSet, DataTable, DataView or any objects that implements IDataReader or IEnumerable.
To populate items from a data source:
-
Assigning the data source to the DataSource or DataSource;
-
If the data source is a DataTable, DataView or IDataReader, you should also provide DataFields to abstract hierarchical data structure from the data source;
-
Optionally, use DataBinding object to define the mappings between data fields and the properties for a NavigationItem. If this step is omitted, fields specifies in DataFields will be used to fill NavigationItem.Text.Html, this step is mandatory if DataSource is a DataSet object.
- Call BaseNavigator.DataBind or DataBind to populate the items.
See
data binding for more details.
See Also
NavigationItemGroup Class | EO.Web Namespace | DataSource