A
Aaron Prohaska
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
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