KaxTickerDataTextField Property |
Gets or sets the field of the data source that provides the value of the ticker lines.
Namespace: Kettic.AspNet.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax public string DataTextField { get; set; }
Public Property DataTextField As String
Get
Set
public:
property String^ DataTextField {
String^ get ();
void set (String^ value);
}
member DataTextField : string with get, set
Property Value
Type:
String
A string that specifies the field of the data source that provides the value of the ticker lines.
The default value is an empty string.
Remarks
Use the DataTextField property to specify the field of the data source (in most cases the name of the database column)
which provides the values for the
Text property of databound ticker items. The DataTextField property is
taken into account only during data binding. If the DataTextField property is not set and your datasource is not a list of strings,
the KaxTicker control will throw an exception.
Examples
The following example demonstrates how to use the DataTextField.
DataTable data = new DataTable();
data.Columns.Add("MyID");
data.Columns.Add("MyValue");
data.Rows.Add(new object[] {"1", "ticker item text 1"});
data.Rows.Add(new object[] {"2", "ticker item text 2"});
KaxTicker1.DataSource = data;
KaxTicker1.DataTextField = "MyValue";
KaxTicker1.DataBind();
Dim data As new DataTable();
data.Columns.Add("MyID")
data.Columns.Add("MyValue")
data.Rows.Add(New Object() {"1", "ticker item text 1"})
data.Rows.Add(New Object() {"2", "ticker item text 2"})
KaxTicker1.DataSource = data
KaxTicker1.DataTextField = "MyValue"
KaxTicker1.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