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
siddiq shameer
NA
44
1.4k
transfering rows between datatables
Aug 19 2016 8:22 AM
I have 2 datagridviews. I need to transfer a single selected row from one to another
I have used this code:-
private
void
button4_Click(
object
sender, EventArgs e)
{
List<Object> TList =
new
List<
object
>();
foreach
(DataGridViewRow row
in
dataGridView1.SelectedRows)
{
TList.Add(row.DataBoundItem);
dataGridView2.DataSource = TList;
}
}
it copies a single row from datagridview1 to datagridview2 .
but when i try to add another row , it replaces the current row in datagridview2.
any solution??
Reply
Answers (
4
)
Generate TextBox Dynamically at Runtime in Windows Form
HTML Text Editor