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

Similar Threads

Gridview Templates 2
Lost ViewState :: GridView + ObjectDataSource 1
Delete rows in Gridview 0
Data-driven Templated Controls (GridView) 4
GridView 3
Dynamic GridView 2
GridView and dynamic query 1
GridView 0

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top