Click or drag to resize
KaxTabControlDataValueField Property
Gets or sets the field of the data source that provides the value of the tabs.

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 DataValueField { get; set; }

Property Value

Type: String
A string that specifies the field of the data source that provides the value of the tabs. The default value is empty string.
Remarks
Use the DataValueField property to specify the field of the data source (in most cases the name of the database column) which provides the values for the Value property of databound tabs. The DataValueField property is taken into account only during data binding. If the DataValueField property is not set the Value property of databound tabs will have its default value - empty string.
Examples
The following example demonstrates how to use the DataValueField.
DataTable data = new DataTable();
data.Columns.Add("MyText");
data.Columns.Add("MyValue");

data.Rows.Add(new object[] {"Tab Text 1", "Tab Value 1"});
data.Rows.Add(new object[] {"Tab Text 2", "Tab Value 2"});

KaxTabControl1.DataSource = data;
KaxTabControl1.DataTextField = "MyText";        //"MyText" column provides values for the Text property of databound tabs
KaxTabControl1.DataValueField = "MyValue";    //"MyValue" column provides values for the Value property of databound tabs
KaxTabControl1.DataBind();
See Also