Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have been having trouble displaying a Grid View inside nested content with Umbraco 8.
I have done this 100ds of times with Umbraco 7 and never had any problems.
In the backend there is no problem. I can add a Grid View to the nested content section an it seems to populate as expected.
The trouble is when it comes to render i the frontend.
So the usual code
@Html.GetGridHtml("WHAT GOES HERE", "mainText", "bootstrap3-fluid")
With Umbraco 7 I used to just pass the nested content section model which is IPublishedContent and it just works.
The problem with Umbraco 8 is that the Grid is wanting an IPublishedContent and the nested content section model with Umbraco 8 is now IPublishedElement.
Is their to get the Grid to either accept IPublishedElement or is there anyway to cast IPublishedElement into IPublishedContent?
Thanks in advanced
So I figured this out. You can actually pass in IPublishedProperty instead of content.
I couldn't see this for looking.
Anyway if anyone has the same problem then the way I achieved this was.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted