RadOrgChart fully supports binding to a wide range of data sources:
- DataSet, DataTable, DataView
- ASP 2.0 DataSource types including
- Table-based DataSource components
- ObjectDataSource
- Any object that implements the IEnumerable interface
Data binding supports binding from a a single self-referencing table
with ID -> ParentID relation.
Below properties and methods are related to data binding:
DataSource - Set to an instance of your data source. This is mandatory when
binding the RadOrgChart at runtime
DataSourceID - Set to the ID of your data source. This is mandatory when
binding the RadOrgChart declaratively
DataFieldID - This is the field name from the data source used to uniquely
identify each row. This field is required when binding to hierarchical data
DataFieldParentID - This is the field name from the data source used to identify
the row for the parent node. This field is required.
DataTextField - This is the field name from the data source that populates
each item's Text property during binding
DataImageUrlField - This is the field name from the data source that populates
each item's ImageUrl property during binding
DataImageAltTextField - This is the field name from the data source that populates
each item's ImageAltText property during binding
DataBind - Call this method after you have set the aforementioned properties
when binding at runtime. This method is mandatory for binding at runtime