Hi,
Options
1. This just simple that u can Iterate thru the GridViewRows and get the data.
foreach (GridViewRow gr in girdView1.Rows)
{
//if using template colums
string value = ((Label)gr.FindControl("lblControl")).Text;
//if using AutoGenerateColums
string value2 = gr.Cells[0].Text;
}
2. How u are adding data to the GridView.. ? If using a DataTable den Store that DataTable somewhere over ViewState and get the data from that.
public DataTable GridViewData
{
get
{
if (ViewState["gridViewData"] == null)
ViewState["gridViewData"] = new DataTable();
return (DataTable)ViewState["gridViewData"];
}
}
This link will help u how to Save data with LINQ http://msdn.microsoft.com/en-us/library/bb399407.aspx