Use SelectedValue in combination with Load On Demand

4 posts, 0 answers
  1. Doeke
    Doeke avatar
    2 posts
    Member since:
    Aug 2014

    Posted 16 Sep 2014 Link to this post

    We use RadComboBox with On Demand service. Is it possible to enter text and select the first match on the server? Something like: Combo.SelectFirstMatchByText('...').

    Or: how can we select an item on the server, when we have a unique value (the webservice would always return one or no item), without having all kinds of custom code with DataBind etc.
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 18 Sep 2014 Link to this post

    Hello,

    There is no option to preselect an item from the web service. The possible approach is to select it on the client, once the items are populated.

    Regards,
    Dimitar Terziev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doeke
    Doeke avatar
    2 posts
    Member since:
    Aug 2014

    Posted 18 Sep 2014 in reply to Dimitar Terziev Link to this post

    Well, I think there should be an option. When converting a "normal" ComboBox to OnDemand behaviour, there is still code like "SelectedValue = xxx". Now there is not an easy solution to address this.

    A possible solution would be: radComboBox.SelectFirstOrDefault("1234")

    The code would call the specified method of the web service, and would pick the first item from the list returned. When I'm in the position, I will try to write something to address this point and post it here.
  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 19 Sep 2014 Link to this post

    Hi,

    Thank you for the feedback. In general the web service is not aware of the control and only returns JSON data which is then parsed on the client.

    Regards,
    Dimitar Terziev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top