This question is locked. New answers and comments are not allowed.
Hi, I Have a GridView in a PartialView which works perfectly on the first call.
The scenario is the following:
User search for a "Service" and then a list appears. When the user selects the "service" there is a PartialView Call to the controller which returns a View with 5 Models, each model in it's form, 3 of them are presented with Grids, which are correcly filled the the needed data.
But when a second "service" is selected, the PartialView correctly calls the controller, the view is returned, the same 5 models are returned with the data but the grids don't actually bind.
After some debugging I found that the InstanceModel() is called first the onDataBinding is called next on the first call, but, for the subsequent calls the onDataBinding is being called BEFORE the InstanceModel(), resulting on an incorrect binding, or error, but I'm not able to pinpoint where this behaviour is happening.
The scripts are being placed correctly on the page.
The scenario is the following:
User search for a "Service" and then a list appears. When the user selects the "service" there is a PartialView Call to the controller which returns a View with 5 Models, each model in it's form, 3 of them are presented with Grids, which are correcly filled the the needed data.
But when a second "service" is selected, the PartialView correctly calls the controller, the view is returned, the same 5 models are returned with the data but the grids don't actually bind.
After some debugging I found that the InstanceModel() is called first the onDataBinding is called next on the first call, but, for the subsequent calls the onDataBinding is being called BEFORE the InstanceModel(), resulting on an incorrect binding, or error, but I'm not able to pinpoint where this behaviour is happening.
The scripts are being placed correctly on the page.