Telerik UI for ASP.NET AJAX

The ItemDataBound event occurs for each new item that is added to the Items collection of the combobox when it is bound. This event only occurs if the items are loaded from a data source (the DataSource or DataSourceID property is set).

For each item that is added from a data source, the following events occur:

  1. A new item is created and added to the Items collection.

  2. The ItemCreated event occurs.

  3. The Text and Value properties of the item are set, based on the data.

  4. The ItemDataBound event occurs.

The ItemDataBound event handler receives two arguments:

  1. The RadComboBox that is loading items. This argument is of type object, but can be cast to the RadComboBox type.

  2. An EventArgs object. This object has an Item property, which provides access to the item that was just bound. This item, in turn, has a DataItem property, which lets you access the item in the data source to which the RadComboBoxItem is being bound.

Use the ItemDataBound event handler to make changes to items as they are bound to the data. For example, you can set custom attributes based on other fields in the DataItem:

See Also