I did it differently, I made a hidden type for its ID value, that is, for "CustomerID" as
@Html.HiddenFor(x=>x.CustomerID)
and when changing the auto completion of kendo, I wrote some event like,
@(Html.Kendo().AutoComplete() .Name("Customers") .DataTextField("CustomerShortName") .Events(events => events.Select("CustomerSelect")) .Filter("contains") .MinLength(3) .Template("<label>${ data.CustomerShortName }</label>") .HtmlAttributes(new { disabled="disabled" }) .DataSource(source => { source.Read(read => { read.Action("GetCustomers", "GetData"); }) .ServerFiltering(true); }) )
And for this I use the Javascript function as ::
<script> </script>
And this is the value that I use when submitting the form. Thank you for your help.
Rahul
source share