If you are facing problem with iterating the row then you can try the below code,
for (int rowCount = 0; rowCount < dataTable.Rows.Count;rowCount++ ) { query.Add(dataTable.Rows[rowCount]); } ViewState["QueryList"] = query;
and reverse----
list = (ArrayList)ViewState["QueryList"]; for (int rowCount = 0; rowCount < list.Count; rowCount++) { DataRow dataRW = (DataRow)list[rowCount]; //add it to desired data table... :) }
Have a good day... ~V
modified on Monday, August 23, 2010 9:35 AM