This code will give me an error:
A circular reference was detected while serializing an object of type 'Umbraco.Core.Models.PublishedContent.PublishedContentType'. Probably because of the Children ad Parent properties.
I have fixed this by copying only the required properties to an anonymous type and then bind that to the grid. But I was wondering if there is a more elegant way of doing this?
Binding a collection of PublishedModels to a Telerik/Kendo Grid
I have a collection of NewsItem models that I would like to bind to a Telerik Grid in my Umbraco site.
Here's the code:
And then:
This code will give me an error: A circular reference was detected while serializing an object of type 'Umbraco.Core.Models.PublishedContent.PublishedContentType'. Probably because of the Children ad Parent properties.
I have fixed this by copying only the required properties to an anonymous type and then bind that to the grid. But I was wondering if there is a more elegant way of doing this?
is working on a reply...