Source Code & Description
Binding r.a.d.tabstrip to an SQL data source is very easy
- just create your connection string, query the database and get the result-set
into a DataTable, DataSet or DataView.Assign
the result to the DataSource property of the tabstrip and
call the DataBind method.
The properties you need to set to define the ID -> ParentID
hierarchy are DataFieldID & DataFieldParentID
respectively - just set them to the SQL data source columns defining
the ID / ParentID relation. You will need to
set the DataTextField property of the tabstrip to the name of
the column holding the name of the respective Tab.
If you need to map additional columns from the SQL data table to properties of
the respective tab, you have to hook the TabDataBound event.
The event arguments passed to the event - e.Tab and e.Tab.DataItem
hold the instance of the tab being bound and the DataItem associated
with the tab. You can then map a property from the DataItem (make
sure to cast the DataItem object to your respetive data type
first - usually DataRowView) to the property of the Tab
class.
