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

get comboBox name at OnClientSelectedIndexChanged

1 Answer 133 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Rubén
Top achievements
Rank 1
Rubén asked on 07 May 2015, 10:38 PM

Hi,

I have a Radcombobox control which runs a javascript function when selected item changes (OnClientSelectedIndexChanged event). When the event is lauched, I want to know the comboBox name that it does. Is there any way?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 08 May 2015, 10:15 AM
Hello,

The OnClientSelectedIndexChanged event receives 2 arguments. The first is the instance of the RadComboBox that is firing the event. You could use this argument to interact with the RadComboBox client-side API. For example, you could get the control's ID as follows:

function OnClientSelectedIndexChanged(sender, eventArgs) {
    sender.get_id();
}

Regards,
Dimitar
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
ComboBox
Asked by
Rubén
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or