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

AutoComplete in Grid

3 Answers 177 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
CS
Top achievements
Rank 2
CS asked on 23 Sep 2014, 09:26 AM
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.

3 Answers, 1 is accepted

Sort by
0
Abdul
Top achievements
Rank 1
answered on 24 Sep 2014, 03:12 PM
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.
0
Alexander Popov
Telerik team
answered on 25 Sep 2014, 09:09 AM
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!
 
0
Abdul
Top achievements
Rank 1
answered on 01 Oct 2014, 01:41 PM
Thanks
Tags
AutoComplete
Asked by
CS
Top achievements
Rank 2
Answers by
Abdul
Top achievements
Rank 1
Alexander Popov
Telerik team
Share this question
or