Table of Contents
DataSource Property

Gets or sets a data source used to populate navigation items.

Syntax
 public override Object DataSource { get; set; }

Property Value

A DataSet, DataTable, DataView or any objects that implements IDataReader or IEnumerable. The default value is a null reference (Nothing in Visual Basic).

Remarks

Use the DataSource property to specify the source of values to bind to a BaseNavigator control. The data source can be an object of one of the following types:

  • DataSet
  • DataTable
  • DataView
  • IDataReader
  • IEnumerable

EO.Web navigation controls can populate multi-level navigation items from a any of the above objects except IEnumerable.

  • When DataSet is used as the DataSource, DataRelation objects defined in the DataSet is used to abstract hierarchical data structure from the DataSet.
  • When DataTable, DataView or IDataReader is used, DataFields must be set to provide a list of key fields used to abstract hierarchical data structure from the data source.
  • When DataSource is an object that implements IEnumerable, only one level of navigation items is populated.
See data binding for details.

See Also