How to recreate custom rows w/o re-binding?

Discussion in 'ASP .Net Datagrid Control' started by aabdis, May 24, 2004.

  1. aabdis

    aabdis Guest

    Here is the problem:

    I create a grid, which in ItemCreated() adds in custom header rows on
    changes in a particular field's value. All fine-and-dandy the first time
    through. On postback however, since the "row" controls were dynamic, they
    are no longer there. This of course screws up eventhandlers and such since
    now the controls on the page dont match the controls in the viewstate.

    How can i recreate those headers? The query that the grid is based on is a
    long-running search query and so it really is not desirable to do a re-bind
    on the grid. ItemCreated doesnt work anymore, since the grid now no longer
    has a datasource. I tried storing all the custom rows and their indices in a
    collection server-side and manually re-adding them on postback, but the IDs
    do not match up and in fact i wound up getting duplicate ids in the control
    tree, which of course ASP complained about.

    So how in the world are you supposed to handle custom rows on the postbacks?
    Thanks in advance for any help, advice, recommendations, etc.

    - --
    aabdis, May 24, 2004
    #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. Carl Prothman [MVP]

    Re: how to recreate the default ASPNET account ?

    Carl Prothman [MVP], Aug 9, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    3,333
    Carl Prothman [MVP]
    Aug 9, 2003
  2. Mark
    Replies:
    2
    Views:
    357
    Chris Jackson
    Feb 23, 2004
  3. kevinsaucier
    Replies:
    0
    Views:
    1,479
    kevinsaucier
    May 12, 2005
  4. Johndoe
    Replies:
    1
    Views:
    507
    Chris Fulstow
    Apr 13, 2006
  5. Hardeep Rakhra
    Replies:
    6
    Views:
    390
    Hardeep Rakhra
    Jan 12, 2004
Loading...

Share This Page