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

Passing Extra parameter to RadComboBox client-event

1 Answer 216 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Akku
Top achievements
Rank 1
Akku asked on 29 Jun 2010, 08:22 AM
Hi All,
    I have multiple OnDemandLoad ComboBoxes on a page. I am handling OnClientSelectedIndexChanged event of each combo separately. Since these combos identical, I want a single js event-handler with an extra parameter (eg. ClientID of a text-box).

I am expecting an easy solution for this requirement.

Thanks,
Akif

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 02 Jul 2010, 09:09 AM
Hello Akku,

The first parameter of the client-side event handlers is sender. This is the instance of the control that raised the event.

<script language="javascript" type="text/javascript">
function OnClientSelectedIndexChanged(sender, eventArgs)
{
 var item = eventArgs.get_item();
 var clientId = sender.get_id();
}

I hope this helps.

Greetings,
Tsvetomir Tsonev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Akku
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or