Changing viewstate on client

P

Paul K

I created a custom datagrid that works similarly to the new GridView control
(using the XML request/response objects to retrieve data in the background
for paging/sorting). Everything is working, but I want to streamline it a
little.

The biggest problem I've had is that the datagrid keeps it's current page
index in viewstate, and viewstate is essentially useless during a client
"callback" because the data in viewstate is out of sync with the events
coming in.

If I could update the viewstate on the client with a new viewstate from the
server, then I wouldn't have to jump through hoops just to get paging to work
- the viewstate would always be in sync with callbacks. I tried just getting
the viewstate in SavePageStateToPersistenceMedium and serializing it with the
LosFormatter class, but I get the "invalid viewstate" exception on any
subsequent calls.

I'm not looking to modify values inside of the viewstate on the client - I'm
looking to update the entire viewstate with a valid viewstate from the web
server.

Does anyone know if this is possible?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top