|
|
This combo is data-bound to array. See code tabs for details.
|
|
|
This combo is data-bound to ArrayList. See code tabs for details.
|
|
|
This combo is data-bound to DataTable. See code tabs for details.
|
|
|
This combo is data-bound to DataSet. See code tabs for details.
|
|
Source Code & Description
r.a.d.combobox fully supports binding to collections, tables and datasets. Simply make sure you populate your collection
from your data-source and set the DataSource property of r.a.d.combobox to the instance of the the collection and call
the DataBind() method. In addition, you can specify the DataTextField and DataValueField of the data-source using the
respective r.a.d.combobox properties.
Data-Binding expressions
You can use databinding expressions in the ItemTemplate template of the combobox. Data-binding expressions have the typical ASP.NET
format and syntax, i.e.
<%# DataBinder.Eval(Container.DataItem, "Author") %>
In r.a.d.combobox the Container object contains two data objects:
- DataItem - the current row of the respective datasource. You can access the column needed using the column name as a second argument.
Example: <%# DataBinder.Eval(Container.DataItem, "Author") %>
- Item - the current item (ComboBoxItem). You can access all properties and custom attributes of the current combobox item.
Example: <%# DataBinder.Eval(Container.Item, "Text") %>
Example: <%# DataBinder.Eval(Container.Item, "CustomAttributes['ImagePath']") %>
