partial view grid event initialization

May 23, 2014 at 11:39 PM
I am rendering a partial view through an ajax call. The partial view contains a grid. I have placed the onRowSelect event registration in my ajax callback function but my code breaks because it doesn't recognize my grid. Is there a way to do this?

MyPartialViewGrid not recognized following successful ajax call and render
to target div.
function (result, textStatus, responseStatus) {        
         pageGrids.MyPartialViewGrid.onRowSelect(function (e) {
         return false;
May 31, 2014 at 3:01 PM

You need to initialize your grid, using
After page loads, gridmvc.js automatically do this, if you render grid after ajax request - you need to do this manually.
Nov 27, 2014 at 9:05 AM

I'm trying to do this in my ajax call here but I get a runtime error saying "Object doesn't support property or method 'gridmvc'".

When I browse through the available methods on my grid object I can call $('FundGrid').init(); but then my pageGrids collection is still empty.

Any thoughts on where I'm going wrong?