Telerik UI for Windows 8 HTML

This article describes the events fired by RadComboBox, their usage and most notable event arguments.

Event Name

Description

Arguments

change

Fires when the value of the RadComboBox changes.

e.target: The RadComboBox control whose value has changed. The new value can be accessed through e.target.value.

close

Fires when the dropdown list of RadComboBox is closed.

e.target: The RadComboBox control whose dropdown was closed.

databinding

Fires when the control is about to databind.

e.target: The RadComboBox control which is about to be bound.

databound

Fires immediately after the control is databound.

e.target: The RadComboBox control that has been bound.

open

Fires when the dropdown list of RadComboBox is shown.

e.target: The RadComboBox control which dropdown has been opened.

select

Fires when an item is selected from the dropdown list.

e.target: The RadComboBox control in which an item has been selected.

e.item: The jQuery object which represents the selected item.

Here is an example of using the select event to access information about the selected item:

RadComboBox Declaration Copy imageCopy
<span id="myComboBox" data-win-control="Telerik.UI.RadComboBox" data-win-options="{
        dataSource: [
            { Name: 'Item1', ID: 1 },
            { Name: 'Item2', ID: 2 },
            { Name: 'Item3', ID: 3 }
        ],
        dataTextField: 'Name',
        dataValueField: 'ID',
        onselect: Sample.Helpers.itemSelected
        }"></span>
<span id="selection" style="color: #33ccff"></span>
Event Handler Copy imageCopy
WinJS.Namespace.define("Sample.Helpers", {
    itemSelected: WinJS.Utilities.markSupportedForProcessing(function (e) {
        var itemIndex = e.item.index();
        var dataItem = e.target.dataItem(itemIndex);
        document.getElementById("selection").innerText = "Selected: " + dataItem.Name;
    })
});