This is a migrated thread and some comments may be shown as answers.

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

3 Answers 254 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Laksh
Top achievements
Rank 1
Laksh asked on 23 Apr 2015, 03:12 AM

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?

3 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 27 Apr 2015, 06:16 AM
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.

 
0
Laksh
Top achievements
Rank 1
answered on 29 Apr 2015, 08:40 PM

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.

0
Alexander Popov
Telerik team
answered on 04 May 2015, 07:38 AM
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.

 
Tags
AutoComplete
Asked by
Laksh
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Laksh
Top achievements
Rank 1
Share this question
or