AutoComplete in Grid

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

    Posted 23 Sep 2014 Link to this post

    I'm currently facing 2 scenarios, both don't work.

    Either I have [object object] when the grid is read, when I click the input field and type in something, the autocomplete fills correctly and when I leave the field, the value is correctly displayed.
    Or I have the grid correctly ready, with the value displaying in the field, I click in the input field and type in something, autocomplete fills correctly when I select an entry it gets inserted correctly, but when I leave the field, it turns into "undefined".
    Mostly what I changed is the display template. I currently do not know to what values/properties the autocomplete binds so that I can adjust the template correctly.
    The field the autocomplete runs on is actually of type object so I want the properties of that object filled correctly and displayed correctly.

    In general, how do I debug an autocomplete widget because I cannot make any breakpoints at any point to check the data.
  2. Abdul
    Abdul avatar
    5 posts
    Member since:
    Sep 2014

    Posted 24 Sep 2014 Link to this post

    I am facing the same problem:
    "Either I have [object object] when the grid is read, when I click the input field and type in something, the autocomplete fills correctly and when I leave the field, the value is correctly displayed."
    With a difference that grid shows the correct autocomplete functionality but when I add row from "Add New Row" and newly added row have this problem, that if i select something in autocomplete from drop down and leave the field, it show [object object] and if i type some thing in autocomplete, leave the field, it shows correct typed values and afterwards on next attempt, it shows correct values from dropdown autocomplete.
  3. Kendo UI is VS 2017 Ready
  4. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 25 Sep 2014 Link to this post

    Hi Stefan, Abdul,

    I would recommend checking this example, which illustrates how an AutoComplete widget could be used as a custom editor. Note how the DataSource's model uses a default value, so new items are populated correctly.
    You can subscribe to the Grid's edit event and once it is triggered - get the instance of the AutoComplete widget by finding it it the e.container argument.

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Abdul
    Abdul avatar
    5 posts
    Member since:
    Sep 2014

    Posted 01 Oct 2014 in reply to Alexander Popov Link to this post

    Thanks
Back to Top
Kendo UI is VS 2017 Ready