System.Web.UI.WebControls.DataGrid.SaveViewState C# (CSharp) Method

SaveViewState() protected method

protected SaveViewState ( ) : object
return object
		protected override object SaveViewState ()
		{
#if NET_2_0
			object [] res = new object [11];
#else
			object [] res = new object [10];
#endif

			res [0] = base.SaveViewState ();
			if (columns != null) {
				IStateManager cm = (IStateManager) columns;
				res [1] = cm.SaveViewState ();
			}
			if (pager_style != null)
				res [2] = pager_style.SaveViewState ();
			if (header_style != null)
				res [3] = header_style.SaveViewState ();
			if (footer_style != null)
				res [4] = footer_style.SaveViewState ();
			if (item_style != null)
				res [5] = item_style.SaveViewState ();
			if (alt_item_style != null)
				res [6] = alt_item_style.SaveViewState ();
			if (selected_style != null)
				res [7] = selected_style.SaveViewState ();
			if (edit_item_style != null)
				res [8] = edit_item_style.SaveViewState ();
#if NET_2_0
			if (ControlStyleCreated)
				res [9] = ControlStyle.SaveViewState ();
			
			if (data_source_columns != null) {
				IStateManager m = (IStateManager) data_source_columns;
				res [10] = m.SaveViewState ();
			}
#else
			if (data_source_columns != null) {
				IStateManager m = (IStateManager) data_source_columns;
				res [9] = m.SaveViewState ();
			}
#endif

			return res;
		}