TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
san
NA
9
0
copying rows from one gridview to another gridvies
Feb 25 2009 1:52 PM
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..
Reply
Answers (
1
)
how to maintain form control values after user control post back
Index was outside the bounds of the array