Autocomplete in a Grid return values for the dataSource

5 posts, 1 answers
  1. con_ssc
    con_ssc avatar
    87 posts
    Member since:
    Apr 2014

    Posted 10 Jun 2014 Link to this post

    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.
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 12 Jun 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. con_ssc
    con_ssc avatar
    87 posts
    Member since:
    Apr 2014

    Posted 12 Jun 2014 in reply to Vladimir Iliev Link to this post

    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.
  5. Answer
    Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 13 Jun 2014 Link to this post

    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!
     
  6. con_ssc
    con_ssc avatar
    87 posts
    Member since:
    Apr 2014

    Posted 16 Jun 2014 in reply to Vladimir Iliev Link to this post

    That works far better, I only get the actual value back in the field.
Back to Top
Kendo UI is VS 2017 Ready