RadComboBox provides support for custom attributes. You can specify custom attributes
declaratively in the RadComboBoxItem tag or programmatically using the Attributes
collection of RadComboBoxItem. On the client, custom attributes can be accessed
using the get_attributes collection of the RadComboBoxItem client
object.
Databinding expressions can be used in the ItemTemplate of RadComboBox. They have
the typical ASP.NET format and syntax. Example:
<%# DataBinder.Eval(Container, "Attributes['ImagePath']") %>
When accessing the values of the attributes defined for the items via a databinding
expressions, the items should be explicitly bound. The items are bound either using
the DataBind() method of the RadComboBoxItem object itself, or using the DataBind()
method of the RadComboBox. The last will automaticaly bind all the items in the
Items collection of RadComboBox.
In RadComboBox, the Container object contains two data objects: DataItem and Item.
The DataItem represents the current row of the respective datasource. The column
needed is accessed using the column name as a second argument of the Eval method.
Example: <%# DataBinder.Eval(Container.DataItem, "Author") %>
The Item, on the other hand, represents the current RadComboBoxItem. All properties
and custom attributes of the current RadComboBox item can be accessed from within
it.
Example: <%# DataBinder.Eval(Container, "Text") %>