KaxTabControlDataFieldParentID Property |
Gets or sets the field from the data source which is the "parent" column in the
"parent-child" relationship used to databind the KaxTabControl
control.
Namespace: Kettic.AspNet.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntaxpublic override string DataFieldParentID { get; set; }
Public Overrides Property DataFieldParentID As String
Get
Set
public:
virtual property String^ DataFieldParentID {
String^ get () override;
void set (String^ value) override;
}
abstract DataFieldParentID : string with get, set
override DataFieldParentID : string with get, set
Property Value
Type:
String
A string that specifies the field of the data source that will be the "parent"
column during databinding. The default is empty string.
RemarksKaxTabControl requires both DataFieldID and
DataFieldParentID properties to be set in order to be hierarchically databound.
The value of the column specified by DataFieldParentID must be null (Nothing) for root tabs. This is a requirement
for databinding KaxTabControl.
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";
KaxTabControl1.DataFieldID = "MyID";
KaxTabControl1.DataFieldParentID = "MyParentID";
KaxTabControl1.DataBind();
Dim data As New DataTable()
data.Columns.Add("MyText")
data.Columns.Add("MyID", GetType(Integer))
data.Columns.Add("MyParentID", GetType(Integer))
data.Rows.Add(New Object() {"Root Tab 1", 1, Nothing})
data.Rows.Add(New Object() {"Child Tab 1.1", 3, 1})
data.Rows.Add(New Object() {"Root Tab 2", 2, Nothing})
data.Rows.Add(New Object() {"Child Tab 2.1", 4, 2})
KaxTabControl1.DataSource = data
KaxTabControl1.DataTextField = "MyText"
KaxTabControl1.DataFieldID = "MyID"
KaxTabControl1.DataFieldParentID = "MyParentID"
KaxTabControl1.DataBind()
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also