GridView and Dynamic Templates - Emergency!

Discussion in 'ASP .Net' started by Craig Buchanan, Jul 18, 2008.

  1. 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.
    Craig Buchanan, Jul 18, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gerald Klein
    Replies:
    0
    Views:
    322
    Gerald Klein
    Aug 6, 2003
  2. =?Utf-8?B?bWFoc2E=?=

    Using Datalist Emergency

    =?Utf-8?B?bWFoc2E=?=, Jun 23, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    347
    =?Utf-8?B?bWFoc2E=?=
    Jun 23, 2004
  3. JKop
    Replies:
    3
    Views:
    451
  4. recover
    Replies:
    2
    Views:
    786
    recover
    Jul 25, 2006
  5. minifish
    Replies:
    0
    Views:
    268
    minifish
    Nov 3, 2008
Loading...

Share This Page