onSelectedIndexChanged javascript code

2 posts, 1 answers
  1. Lubna Ansari
    Lubna Ansari avatar
    65 posts
    Member since:
    Feb 2010

    Posted 31 Mar 2010 Link to this post

    Hi,

    I am adding a RadComboBox dynamically from code behind.
    I've assisgned the onSelectedIndexChanged event to the combo. The following code is firing properly and I am getting item as object. But I need to check the selected value of combobox so that I can compare it with my string.
    How to do that??

    function

     

    onSelectedIndexChanged(sender, eventArgs)

     

    {

     

    var item = eventArgs.get_item();

     

     

     

    }

    Regrads,
    Lubna.

  2. Answer
    robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 31 Mar 2010 Link to this post

    To get the value of the selected item you would do this:

    var selectedValue = eventArgs.get_item().get_value(); 

    You can view all the exposed methods for the client-side RadComboBoxItem here:


    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top