Passing Extra parameter to RadComboBox client-event

2 posts, 0 answers
  1. Akku
    Akku avatar
    8 posts
    Member since:
    May 2010

    Posted 29 Jun 2010 Link to this post

    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
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 02 Jul 2010 Link to this post

    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
Back to Top