How to bind Autocomplete's selected values control with model?

4 posts, 0 answers
  1. Laksh
    Laksh avatar
    25 posts
    Member since:
    Mar 2011

    Posted 22 Apr 2015 Link to this post

    How can we bind autocomplete's selected values to model so I can use those values on the server? The examples I have seen so far only selects the values on client side and diaplay them as tags. I want to populate the values into control using Ajax call, but after items are selelted i want selected values to be passed to model using model binding. How that can be done?

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 27 Apr 2015 Link to this post

    Hello Laksh,

    You can use the AutoComplete's value or dataItem methods, depending on whether you want to send the string value only or the entire object. Once you got the value you can send it to the server using an Ajax request and handle it on the server-side as usual.

    Regards,
    Alexander Popov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Laksh
    Laksh avatar
    25 posts
    Member since:
    Mar 2011

    Posted 29 Apr 2015 in reply to Alexander Popov Link to this post

    Well, since we are using Kendo UI for MVC the selected values need to post to the server using MVC binding framework. Ajax method you suggested is not useful here even though it can send the data to server.

  5. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 04 May 2015 Link to this post

    Hello Laksh,

    I am not sure I understand what the expected behavior is and why the approach I suggested is not viable. Would you please share more details about the scenario?

    Regards,
    Alexander Popov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready