GridView and Dynamic Templates - Emergency!

C

Craig Buchanan

I am adding templates to a gridview dynamically. these columns are based on
data values that are generated prior to calling the gridviews databind.

the challenge is when the form does a postback. i need to recreate these
templates. until now, i've been storing the data needed to create the
dynamic columns in a session variable. i was hoping to use the viewstate,
but the viewstate isn't loaded until page_load. the gridview's templates
are recreated in page_init (as far as i can tell).

is there a way to delay the gridview's template creation until after the
viewstate is loaded? i'm having some serious issues with using session
variables in this way.

another question. is there a way to identity the template columns that are
defined in the ASCX page? does the gridview load these during page_init as
well?

thanks a lot in advance.
 

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
474,263
Messages
2,571,062
Members
48,769
Latest member
Clifft

Latest Threads

Top