This question is locked. New answers and comments are not allowed.
Hi.
using MVC 2.0 here.
We have a Controller. This controller has invoked from different views but also partial views.
I have a class (somewhat a view helper) which has 2 properties. One is an IEnumerable<T> and the other property is just a singular entity.
Got the GridControl to bind the IEnumerable<T> items fine.
The ordering (sorting) of the collection is done at the Action (server) end like so:
viewHelper.Pubs = pubs.OrderByDesending(p => p.CreatedAt)..... you see how it is.
This then is returned to a View, which has a partial view.
The partial View directly gets this model/helper passed into it.
The Grid control binds it.
Problem: When we say go to a row/record to view more details about that item, then when we hit back on the browser - the items on the grid are no longer ordered and for some bizarre reason, somewhere, a few more items are being added into the control somehow.
There is nothing "fancy" going on behind the scenes apart from obtaining a collection of entities (and ordering them by the CreatedAt field in DESC), and another entity - putting these 2 into a ViewHelper as 2 properties.
This really has been giving me a headache all day today and no idea where to go.
Any ideas are appreciated. It just doesnt make sense why the grid decides to ignore the model it has been given in the correct order. Even performing the Ordering on the grid itself does not make any difference.
There is also NO ajax databinding going on.
using MVC 2.0 here.
We have a Controller. This controller has invoked from different views but also partial views.
I have a class (somewhat a view helper) which has 2 properties. One is an IEnumerable<T> and the other property is just a singular entity.
Got the GridControl to bind the IEnumerable<T> items fine.
The ordering (sorting) of the collection is done at the Action (server) end like so:
viewHelper.Pubs = pubs.OrderByDesending(p => p.CreatedAt)..... you see how it is.
This then is returned to a View, which has a partial view.
The partial View directly gets this model/helper passed into it.
The Grid control binds it.
Problem: When we say go to a row/record to view more details about that item, then when we hit back on the browser - the items on the grid are no longer ordered and for some bizarre reason, somewhere, a few more items are being added into the control somehow.
There is nothing "fancy" going on behind the scenes apart from obtaining a collection of entities (and ordering them by the CreatedAt field in DESC), and another entity - putting these 2 into a ViewHelper as 2 properties.
This really has been giving me a headache all day today and no idea where to go.
Any ideas are appreciated. It just doesnt make sense why the grid decides to ignore the model it has been given in the correct order. Even performing the Ordering on the grid itself does not make any difference.
There is also NO ajax databinding going on.