This is a migrated thread and some comments may be shown as answers.

ViewResultBase.Model unexpected result when using Telerik MVC Grid in view

0 Answers 9 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dan
Top achievements
Rank 1
Dan asked on 31 Jul 2011, 07:01 AM
I currently have an ActionFilter i'm using to dynamically cache the model being passed to the view. When I'm using a Telerik Grid (haven't tried others yet) the ActionResultBase.Model is returning the last item that was used in the grid.

In my example I have a OpenPalletModel class being passed to the view and inside of that class there is a Pallets property which returns a List<OpenPalletItem> which is what i'm passing into the grid.

So to summarize:

Inside the method of my ActionFilter OnResultExecuted

ActionResultBase.Model without the grid in the view returns OpenPalletModel object

ActionResultBase.Model with the grid in the view returns just a single OpenPalletItem object.

Is there something i'm doing wrong here? Thanks in advance.

Daniel





Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Share this question
or