ArrayList da1 = new ArrayList(); ArrayList da2 = new ArrayList(); int a1 = 0; int a2 = 0; DataSet dc = (DataSet) Session["dtb"]; //DataRow tr = (DataRow)Session["dg"]; foreach (GridViewRow row1 in grv1.Rows) { a1 = int.Parse(row1.Cells[3].Text); da1.Add(a1); } int ri = 0; //int rd = 0; foreach (GridViewRow row1 in grv1.Rows) { //foreach (GridViewRow row2 in grv2.Rows) //{ foreach (DataRow dr in dc.Tables[0].Rows) { //rd = int.Parse(dr.ToString()); foreach (int ir in da1) { for (; ri < ir; ri++) { //row2.Cells[1].Text = row1.Cells[1].Text; dr[1] = row1.Cells[1].Text; } ri = ir; } //break; } //break; // continue; } grv2.DataSource= dc; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)