Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
Wingrid Sorting
posted

Can someone provide me with a suggestion on how to handle sorting on the Wingrid?  Here is my scenario.  I'm populating the wingrid from a dataView that's derived programattically (i call a stored procedure, etc.).  Let's say we have State and County as fields for example.  In that stored procedure i sort by state ASC.  Suppose the user sorts by county then adds a record.  The new record shows up in the wrong place in the grid.  I would like to have the grid sort it in the correct place automatically when a record is added - according to whatever sorting criteria the user previously selected.  Additionally i would like to preset the sort indicator/etc. so that the correct column and direction show up initially (State and ASC in my case)

 I imagine it's a matter of recording the sort criteria somehow then resorting the underlying DataView object once my update/insertion is complete but i'm not sure.

Note that i do not make another call to the stored procedure so the initial sorting done in there should not matter.