Datagrid and Viewstate Size

R

rgouge

I have a datagrid on a page .. which can be very large .. a couple of
hundred rows and 20 columns. Some of the columns are custom templates
allowing the user to enter in text or select a checkbox .. since there are
several postbacks while interacting with the page .. reducing the viewstate
size is important. I've thought about setting the viewstate to false on the
grid and rebinding on a postback but how would I go about capturing the data
posted back to accurately update a copy of the dataset on the server which
is bound to the grid.

Randall
 
B

Brock Allen

If you re-databind the grid in Page_Init then this approach will work --
the trick is to rebuild the grid and all of it's child controls before the
Page loads the viewstate and postdata.
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top