0


I want to add GridLookup as an item to my MVCxFormLayoutItemCollection and provide it as a control collection to a form. This GridLookup is using Partial View for definition since it has large data set.

I need to SetNestedContent for some item from a code, and inside render partial. Something like: Html.RenderAction("GridLookupPartial", new { bindField = Model.GridField, gridSource = Model.Source }

So is it possible to call somehow Html.RenderAction from the code, or some other solution exists?

Muris
  • 158
  • 8
  • for loading a partial from the view I would recommend using ajax. see here http://stackoverflow.com/questions/11947540/load-partialview-with-using-jquery-ajax – Matt Bodily Aug 28 '14 at 14:20
  • I need to have this in a code. Not in view, since form is generated and not hardcoded design in view. – Muris Aug 28 '14 at 14:39
  • with the ajax call you pass the id or whatever is relevant for the partial. build the model, return the partial with the model and the ajax call will put the result into the div you specify in the success. so the content of the view is dynamic – Matt Bodily Aug 28 '14 at 14:51
  • I ended up using GridLookupExtension and it's GetHtml method within SetNestedContent. Thank for effort Matt. – Muris Aug 29 '14 at 09:44

0 Answers0