T
tshad
I am trying to save the pointer to my datagrids.
I have a pointer, oGrid, that is global and when when I bind to a Datagrid -
I am setting the oGrid to the that DataGrid. This is so I can clear that
DataGrid when I open another.
The problem is that when I postback, I lose the value in oGrid, so I need to
save that in ViewState (I believe). But when I do that I get:
The type 'System.Web.UI.WebControls.DataGrid' must be marked as Serializable
or have a TypeConverter other than ReferenceConverter to be put in
viewstate.
How do I set the DataGrid as Serializable and why do I need to? I 'm only
trying to save the pointer to the DataGrid which is already being saved in
the Viewstate.
Thanks,
Tom
I have a pointer, oGrid, that is global and when when I bind to a Datagrid -
I am setting the oGrid to the that DataGrid. This is so I can clear that
DataGrid when I open another.
The problem is that when I postback, I lose the value in oGrid, so I need to
save that in ViewState (I believe). But when I do that I get:
The type 'System.Web.UI.WebControls.DataGrid' must be marked as Serializable
or have a TypeConverter other than ReferenceConverter to be put in
viewstate.
How do I set the DataGrid as Serializable and why do I need to? I 'm only
trying to save the pointer to the DataGrid which is already being saved in
the Viewstate.
Thanks,
Tom