Click or drag to resize
KaxTabControlDataFieldID Property
Gets or sets the field from the data source which is the "child" column in the "parent-child" relationship used to databind the KaxTabControl control.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public override string DataFieldID { get; set; }

Property Value

Type: String
A string that specifies the field of the data source that will be the "child" column during databinding. The default is empty string.
Remarks
KaxTabControl requires both DataFieldID and DataFieldParentID properties to be set in order to be hierarchically databound.
Examples
The following example demonstrates how to use DataFieldID and DataFieldParentID.
DataTable data = new DataTable();
data.Columns.Add("MyText");
data.Columns.Add("MyID", typeof(int));
data.Columns.Add("MyParentID", typeof(int));

data.Rows.Add(new object[] {"Root Tab 1", 1, null});
data.Rows.Add(new object[] {"Child Tab 1.1", 3, 1});
data.Rows.Add(new object[] {"Root Tab 2", 2, null});
data.Rows.Add(new object[] {"Child Tab 2.1", 4, 2});

KaxTabControl1.DataSource = data;
KaxTabControl1.DataTextField = "MyText";            //"MyText" column provides values for the Text property of databound tabs
KaxTabControl1.DataFieldID = "MyID";                //"MyID" column provides values for the "child" column in the relation.
KaxTabControl1.DataFieldParentID = "MyParentID";    //"MyParentID" column provides values for the "parent" column in the relation.
KaxTabControl1.DataBind();
See Also