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

Autocomplete in a Grid return values for the dataSource

4 Answers 66 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
CS
Top achievements
Rank 2
CS asked on 10 Jun 2014, 01:27 PM
I already asked a similar question [Object object] but I cannot reply in that thread anymore, I don't know why. So my problem is I make a successful autocomplete with remote data but I don't know what of the data I put into the success is set and where, in the dataSource or model because I then get an [Object object] in the Object property of the dataItem property of the fieldname I inserted in the autocomplete instead of just its value. Further more I would like to set/change additional values in the row of the successful autoselect or if the autoselect is closed without a selection.

4 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 12 Jun 2014, 09:40 AM
Hi Stefan,

Could you please provide the current Grid code that you are using as well as all related scripts? This would help us better understand the exact scenario that you have and advice you better how to proceed.

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
CS
Top achievements
Rank 2
answered on 12 Jun 2014, 11:42 AM
That is really hard because I work in MS CRM and with a not fully implemented REST endpoint and stuff.

Autocomplete in Grid in this example I feed the products json to the autocomplete and let it search in only the productname property, the thing is, beside the display of the name I don't know what gets inserted into the dataitem of that row when I try an update with the data in that row on a remote database. My problem is that instead of the actual productname I have [Object object] in the property "productname" instead of the productname, and I cannot make updates or creates with that.
Hope that helps a little bit since I cannot provide a REST endpoint for such an example.
0
Accepted
Vladimir Iliev
Telerik team
answered on 13 Jun 2014, 10:03 AM
Hi Stefan,

Could you please try to set the "valuePrimitive" option of the autoComplete to "true" and let us know of the result?

e.g.:
.kendoAutoComplete({
  suggest: true,
  valuePrimitive: true,

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
CS
Top achievements
Rank 2
answered on 16 Jun 2014, 05:24 AM
That works far better, I only get the actual value back in the field.
Tags
AutoComplete
Asked by
CS
Top achievements
Rank 2
Answers by
Vladimir Iliev
Telerik team
CS
Top achievements
Rank 2
Share this question
or