1
Answer

copying rows from one gridview to another gridvies

san

san

16y
8.9k
1
hi, am filling one gridview with values from database..then i want to copy the selected rows through checkboxes into another gridview.. below is the code in c# DataTable dt = new DataTable(); foreach(GridViewRow dgr in GridView1.Rows) { if(((CheckBox)(dgr.FindControl("chkbx"))).Checked==true) { dt.Rows.Add(dgr); } GridView2.DataSource=dt; GridView2.DataBind(); when i compile am getting Input array is longer than the number of columns in this table error message..am new to .net..any help will be greatly appreciated..
Answers (1)