sorting composite control data on postback

Discussion in 'ASP .Net Building Controls' started by Aaron Prohaska, Nov 6, 2003.

  1. I can't seem to figure out how to make this work. I need some sort of
    design for a composite control that will allow the following things to
    happen in the order listed.

    -------------------------------
    Page is not postback.
    -------------------------------
    Get datatable with data from my data tier.
    DataTable data = DataTier.GetItems();
    Save data to ViewState

    loop through data and fill properties of child controls.

    add child controls to composite control.

    -------------------------------
    Page is postback
    -------------------------------
    Get data from ViewState so I don't have to hit the database to get the
    same data.
    data = (DataTable)ViewState["name"];

    sort data using a DropDownList to fire the postback event and retrieve
    the column name to sort by.

    save sorted data to ViewState["name"];

    loop through sorted data and fill properties of child controls.

    add child controls to composite control.

    Obviously part of the reason that I'm having a hard time with this is
    because I don't completely understand the execution cycle of the control
    and don't know when each action should happen to make this work.

    regards,

    Aaron
     
    Aaron Prohaska, Nov 6, 2003
    #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,742
    sleigh
    Feb 12, 2004
  2. debartsa
    Replies:
    1
    Views:
    283
    John Saunders
    Apr 23, 2004
  3. Donal McWeeney

    composite control and postback data change handling

    Donal McWeeney, Oct 12, 2004, in forum: ASP .Net Building Controls
    Replies:
    6
    Views:
    197
    Steven Cheng[MSFT]
    Oct 28, 2004
  4. Chad
    Replies:
    0
    Views:
    255
  5. STech

    Composite control, postback and change control tree

    STech, Nov 4, 2005, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    543
    Steven Cheng[MSFT]
    Nov 21, 2005
Loading...

Share This Page