Client API for Setting Value to ComboBox

2 posts, 0 answers
  1. Rahul
    Rahul avatar
    3 posts
    Member since:
    Jun 2013

    Posted 15 Jun 2015 Link to this post



    In My Application I have Cascading combo box, User is selecting one combo box and based on selection of first combo box second combo box  will get populated,  now I am storing those values to database and I want to set the value of combo box from Java script to allow user to update those values. To do so how can I set the text of combo box having LoadOnDemand from javascript. e.g. My combobox will have the items as

    Employee ID    EmployeeName

    1                          ABC

    2                          PQR

    now I am getting PQR from database and I want to set it to Combo box having PopulateOnDemand Property = true. I tried to create the object of Combobox in JavaScript and then tried with FindItemByText property, but since combo box is configured to Load on demand it is not able to find anything and not able to set the value.

    Please let me know how to do it using JavaScript.

  2. Nencho
    Nencho avatar
    1661 posts

    Posted 18 Jun 2015 Link to this post

    Hello Rahui,

    Indeed the RadComboBoxItems collection is not accessible at server-side, but it is at client-side. You can use the findItemByText() at client-side and set the item as selected:


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