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've set the "enabledPreview" to true within the grid config , but I'm having issue displaying a view with a custom controller within the grid. It shows the below error
The model item passed into the dictionary is of type 'TestApplication.ViewModels.QuoteViewModel', but this dictionary requires a model item of type 'Umbraco.Core.Models.IPublishedContent'.
Any way to go around this?
I fixed this by returning the view without the model in the custom controller.
//Check if it's a grid preview
bool preview = Request.QueryString["dtgePreview"] == "1";
At the top of your view, do you still use any @model?
Can you share how your view and controller looks like (a sample will be great).Thanks
Tried that, i'm calling a different view when there's a preview but another error appear showing the below
"Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space."
I take it you are trying to pass down a custom, strongly typed model? If so, did you update your view to the following?
If you are passing down a strongly typed view model, you need to update your view to let it know what model to expect. By default it'll expect IPublishedContent, but if you change that, you need to let it know.
Thanks Matt, let me try that out
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted