Retain DataGrid contents between postbacks

P

Peter

I have a webpage with TabControl
The Tab Control has serveral tabs with User Defined controls on each tab
Two of those User Controls have DataGrid, each DataGrid is wrap in Ajax
Extention UpdatePanel
One of the DataGrids takes a long time to fill (several seconds) and it's
filled only when a user clicks on that tab.

The problem I am having is when the frist DataGrid creates a postback the
contents of the second DataGrid (on another tab) are lost and it requires
another lenghty process to retreive the data.

(in the first DataGrid when a user clicks on a row it retreives a picture
and that's when the postback is genarated)

My question is how can I retain the contents of the second DataGird between
postbacks, the second DataGrid might contain at the most 20 records with 15
fields each record?

Thank You


Peter
 
P

Peter

I figured it out, setting the EnableViewState="true" for the User Control
did the trick.
 

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,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top