I was looking into why the data value of the Autocomplete control was not submitting to my controller via an ajax form and came across this article: https://www.telerik.com/forums/autocomplete-send-selected-dataitem-to-controller#-BRzEKVnbUyebqxFKYWpcA. Would it be possible in a future release to include a dataValueField option so that the value of the data item selected can be used by the controller? What's weird is this is not an issue when using the autocomplete control inside a grid. I was able to get the value and update my model.
Posted on:29 May 2019 06:48
Thank you for sharing your approach. I believe it would be of use to other developers too.
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.
Posted on:22 May 2019 13:17
Hello. Thanks for your reply. I was not aware of the ComboBox. I will have to check it out. I actually got this working after all using the AutoComplete control by utilizing the Select event and saving dataItem value to hidden field inside the AJAX form.
Here is the razor code, controller and service that handles the Grid with AutoComplete update functionality. The AutoComplete is hooked up to an object with Id and Name properties.