AutoCompete get additional info

0 Answers 27 Views
AutoComplete
Salma
Top achievements
Rank 1
Iron
Salma asked on 24 Nov 2021, 06:03 PM

Hi I am using the Autocomplete textbox.  It finding to the datasource fine.  Just like Product is being used in the demo. 

1. My question is if I have a product list. And it has the column product type , and I want to captrue the value of prodcut type then how I can do that. Product is binds with the userId. 

 

2.  I have a model class as 

ModelViewMY {

date TodaysDate {get;set} // date is not part of the list. 

List<Users> Users {get;set}

}

Question now: if I am using the AutoComplete in my mvc project then how I can set the DataTextFiled(Useres.UserId). I tried but I am getting errors. 

 

 @(Html.Kendo().AutoComplete()
                        .Name("searchParam")
                        .DataTextField("Id") //DataTextField("dataField")
                        .Filter("contains")
                        .MinLength(3)                       
Anton Mironov
Telerik team
commented on 29 Nov 2021, 02:39 PM

Hi Salma,

Thank you for the code snippets and details provided.

Feel free to correct me if I misunderstand the task completely.

If you are trying to get a foreign key column, I would recommend trying one of the following:

I hope this information helps. If further assistance is needed - send me a runnable sample of your application and I will try my best to achieve the desired behavior locally.

Looking forward to hearing back from you.

Kind Regards,
Anton Mironov 

No answers yet. Maybe you can help?

Tags
AutoComplete
Asked by
Salma
Top achievements
Rank 1
Iron
Share this question
or