DataGrid/ViewState in Composite Control

Discussion in 'ASP .Net Web Controls' started by jps, Jan 9, 2004.

  1. jps

    jps Guest

    We have a composite control that encapsulates a DataGrid
    and some other widgets. Whenever a PostBack is issued on
    the ASPX page containing this control, the controls
    constructor is called, along with CreateChildControls.

    This seems to create a problem when using PageSize within
    the encapsulated DataGrid, since the DataGrid effectively
    gets re-created each time someone clicks on "Next".

    What is the proper method for managing this - how do we
    maintain the ViewState of the encapsulated DataGrid within
    our Composite control? OR... is attempting to encapsulate
    a DataGrid something that isn't supposed to be feasible (?)

    -- jps
     
    jps, Jan 9, 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. sleigh
    Replies:
    1
    Views:
    2,694
    sleigh
    Feb 12, 2004
  2. Mark Olbert
    Replies:
    1
    Views:
    5,247
    Steven Cheng[MSFT]
    Feb 23, 2006
  3. Andy
    Replies:
    2
    Views:
    1,272
    Patrice
    Apr 9, 2010
  4. Chad
    Replies:
    0
    Views:
    227
  5. whoisnidhee

    ViewState of the Composite Control composed of custom control

    whoisnidhee, Jul 14, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    318
    Nidhee
    Jul 16, 2004
Loading...

Share This Page