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

[object Object] and Undefined for columns

2 Answers 355 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Spirent
Top achievements
Rank 1
Spirent asked on 31 Oct 2016, 07:07 PM

Have a json array that has arrays of arrays.  However, the key value pair of an array is displaying "[object Object]"  when I add the template "=#manufacturer.name" I get undefined.  Can the grid handle this type of json object.  See attached file for object layout.  I am using Kendo UI Grid with AngularJS 1.15

2 Answers, 1 is accepted

Sort by
0
Spirent
Top achievements
Rank 1
answered on 31 Oct 2016, 07:09 PM
The template is '#=manufacturer.name#"
0
Alexander Popov
Telerik team
answered on 02 Nov 2016, 09:23 AM
Hello Spirent,

It appears that the "manufacturer" property is an array, thus you need to access its elements first. For example:
#=manufacturer[0].name#
You can also iterate over all items and display the "name" property of each one.

Regards,
Alexander Popov
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
Tags
Grid
Asked by
Spirent
Top achievements
Rank 1
Answers by
Spirent
Top achievements
Rank 1
Alexander Popov
Telerik team
Share this question
or