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

Grid changing list.count type to "object"

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 15 Apr 2015, 10:35 PM

Hi,

I have a custom class with a few strings and a list My grid is bound to a collection of my custom class and one of the columns is for the list.count. When the Grid renders, the column is empty. When reviewing the html code for the Grid, I discovered that the object type of list.count is now "object", see below:

{"Provider":{"type":"string"},"Type":{"type":"string"},"Bills":{"type":"object"}

 Where bills is a List<>. 

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 17 Apr 2015, 12:42 PM
Hello Matt,

Setting the Bills type to "object" is expected, as what JavaScript arrays are: 
[] instanceof Object
true
That being said, if the Bills field is properly populate you can display it in the Grid using a template, as shown in this proof of concept example.

Regards,
Alexander Popov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Grid
Asked by
Matt
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or