Grid changing list.count type to "object"

2 posts, 0 answers
  1. Matt
    Matt avatar
    3 posts
    Member since:
    Jan 2015

    Posted 15 Apr 2015 Link to this post

    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<>. 

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1442 posts

    Posted 17 Apr 2015 Link to this post

    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.

     
Back to Top