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
All the documentation seems to suggest displaying the grid content via a Template but is there a way to display the content within a Partial View?
I have tried something like this:
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.Test> @using ContentModels = Umbraco.Web.PublishedContentModels; @Html.GetGridHtml(Model.Content, "propertyAlias")
but I get Object Reference not set...etc
I can use
@Umbraco.Field("fieldname")
which returns json, but that's not really helpful.
It works fine in the Master template, but that's not much use either.
Hi From a partial view, you can access the Grid like this:
@Html.GetGridHtml(Umbraco.AssignedContentItem, "propertyAlias")
Kind regards
Paul
Hey Paul, I have some problem finding my property alias for my grid. My first guess would be "text" - see picture below.
But that didn't work. Afterwards I look up in the Data type and type "columns" that didn't work either.
So i am lost?
Worked. Many thanks!
You're welcome, please mark the solution so people know it is solved.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Grid in a Partial View
All the documentation seems to suggest displaying the grid content via a Template but is there a way to display the content within a Partial View?
I have tried something like this:
but I get Object Reference not set...etc
I can use
which returns json, but that's not really helpful.
It works fine in the Master template, but that's not much use either.
Hi From a partial view, you can access the Grid like this:
Kind regards
Paul
Hey Paul, I have some problem finding my property alias for my grid. My first guess would be "text" - see picture below.
But that didn't work. Afterwards I look up in the Data type and type "columns" that didn't work either.
So i am lost?
Worked. Many thanks!
You're welcome, please mark the solution so people know it is solved.
Kind regards
Paul
is working on a reply...