in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

kwanl's blog

Datagrid not retaining viewstate on postback

I haven't done much DataGrid programming in the past but it's used quite a bit at my new job. I thought I was pretty proficient at ASP.Net 1.1 but I was having some trouble getting the DataGrid viewstate to work. The problem was when you have AutoGenerateColumns set to false you have to do a little bit of extra work for the viewstate to load, you need to set up the columns on each page load.

http://www.velocityreviews.com/forums/t111954-net-datagrid-contents-lost-on-postback.html

Comments

 

Terrier said:

Do you have a Rendering sample that works?  The sample here: msdn.microsoft.com/.../CustomRenderers just gives a "Cannot Open Closed Stream"  error on Export.

Some source code that actually worked would surely be useful since the documentation is so thin.

September 11, 2007 8:30 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts