This is a migrated thread and some comments may be shown as answers.

add eventhandler to RadCombobox in jQuery

1 Answer 132 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
RMM
Top achievements
Rank 1
RMM asked on 18 Aug 2015, 11:41 AM

Hi

Is there a equivalent to the $(document).on function for the clientSelectedIndexChanging and clientSelectedIndexChanged events for a RadCombobox in jQuery?

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 20 Aug 2015, 01:22 PM
Hi Rene,

If you would like to add handlers for the client events of RadComboBox via JavaScript you can use an approach similar to the one illustrated below:

Markup:

<telerik:RadComboBox runat="server" ID="RadComboBox1">
    <Items>
        <telerik:RadComboBoxItem Text="item1" />
        <telerik:RadComboBoxItem Text="item2" />
        <telerik:RadComboBoxItem Text="item3" />
    </Items>
</telerik:RadComboBox>

JavaScript:

$telerik.$(document).ready(function () {
    $find("<%= RadComboBox1.ClientID %>").add_selectedIndexChanged(selectedIndexChangedHandler);
});
 
function selectedIndexChangedHandler(sender, args) {
    alert("selected index changed");
}



Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Ajax
Asked by
RMM
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or