M
mark
Hi there,
I've got a problem. I need to store my server controls view state.
This all seems very easy when dealing with simple properties, just pop
them in the Viewstate bag and retrieve them when you need them.
Problem for me is that I have a Server Control which is a form of
datagrid display and it looks like the following: -
My Server Control
- ColumnHeaders (collection)
- ColumnHeader (class)
- HeaderButtons (collection)
- Button (class)
- DetailButtons (collection)
- Button (class)
- Rows (collection)
- Row (collection)
- Item (class)
- ID (property
- Title (property)
- Datasource (method)
- Etc...
I've looked all over the net trying to find out how to save the
viewstate of all my collections but I haven't found anything that
helps. I've read about LoadViewState and SaveViewState and the
IStateManager and seen examples using them but I haven't seen any
examples that show the Container, Collection and Class.
I guess that my collection and classes need to implement the
IStateManger interface? Or is it just the collection?
Do I need to use TrackViewState?
I know these could be all very simple questions to answer, but they
aren't for me! :-(
Please help! What would be really useful would be just a short example
in C# showing how it's done. I find that the best way to understand.
Thank you in advance,
Mark (in dire need) Bateman...
I've got a problem. I need to store my server controls view state.
This all seems very easy when dealing with simple properties, just pop
them in the Viewstate bag and retrieve them when you need them.
Problem for me is that I have a Server Control which is a form of
datagrid display and it looks like the following: -
My Server Control
- ColumnHeaders (collection)
- ColumnHeader (class)
- HeaderButtons (collection)
- Button (class)
- DetailButtons (collection)
- Button (class)
- Rows (collection)
- Row (collection)
- Item (class)
- ID (property
- Title (property)
- Datasource (method)
- Etc...
I've looked all over the net trying to find out how to save the
viewstate of all my collections but I haven't found anything that
helps. I've read about LoadViewState and SaveViewState and the
IStateManager and seen examples using them but I haven't seen any
examples that show the Container, Collection and Class.
I guess that my collection and classes need to implement the
IStateManger interface? Or is it just the collection?
Do I need to use TrackViewState?
I know these could be all very simple questions to answer, but they
aren't for me! :-(
Please help! What would be really useful would be just a short example
in C# showing how it's done. I find that the best way to understand.
Thank you in advance,
Mark (in dire need) Bateman...