joeharrison714 / MVCGrid.Net

http://mvcgrid.net
MIT License
74 stars 55 forks source link

Partial view pass a model to MVCGrid #103

Open 1TMAN1010 opened 7 years ago

1TMAN1010 commented 7 years ago

I'm in a partial view where a Model that is populated with a light dataset is getting passed in to that view, now I simply want to pass that Model to the grid. I see the QueryOptions, but that doesn't do what I need, I'd like to provide the model to GridMvc, is there a method to do this?

1TMAN1010 commented 7 years ago

It would be nice if I could just reference the model or a property on the current model and get that into the Grid something like: @Html.MVCGrid("gridfoo", Model.dataResultList) however I ended up just adding to the session and accessing via session in the RetrieveDataMethod of the GridDef.

ktngoykalolo commented 7 years ago

has that worked for you ?