且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Datagridview在Windows窗体中编辑应用程序

更新时间:2023-12-06 10:28:40

检查过去的答案

将行从一个DataGridView复制到C#中的其他DataGridView [ ^ ]
Check this past answer
Copy Rows from One DataGridView to Other DataGridView in C#[^]


First make确保使用DATASET为DataGridView控件更新DataSource属性...



然后在Button Click事件上..将所选行传输到DataSet,在那里你要移动记录...和....然后再次更新两个DataGridView控件的DataSource属性...



在第二次更新DataSource之前...不要忘了从第一个DataGridView的OLD表/数据集中删除相同的行...





只需简单的步骤...... >


1。将数据集中的表设置为两个DataGridview控件的DataSource

2.在传输任何行时根据需要更改数据集

3.再次,从数据集设置更新表作为DataGridview控件的DataSource
First make sure that DataSource property is update for both DataGridView Controls using DATASET...

then on Button Click event.. transfer the Selected Row to DataSet where you want to move the record ...and ....then again update the DataSource Property of both DataGridView Controls...

Before update DataSource for second time... Don't forgot to DELETE the same Row from OLD table/Dataset of first DataGridView...


in simple steps...

1. Set Tables from Dataset as DataSource of both DataGridview controls
2. Make changes to Dataset as required while transferring any row(s)
3. Again, set update Tables from Dataset as DataSource of both DataGridview controls