private void copyDataGridViewRow( DataGridView src, DataGridView
dst )
{
DataGridViewRow srcrow = src.CurrentRow;
dst.CurrentCell = dst.Rows[ dst.Rows.Count - 1 ].Cells[ 1 ];
DataGridViewRow dstrow = dst.CurrentRow;
dst.BeginEdit( false ); // ?????
for ( int i = 0 ; i < dstrow.Cells.Count ; i++ )
dstrow.Cells[ i ].Value = srcrow.Cells[ i ].Value;
// how to commit here?????
src.Rows.Remove( srcrow );
return;
}
how to commit?
thanks.
wu jianhua.
"wu jianhua" <bigwu99 (AT) hotmail (DOT) com> дÈëÓʼþ
news:%2350YsUrZGHA.3960 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Quote:
hi,
I have 2 DataGridViews( gridSrc, gridDst), their datatable(DataSource)
have
same columns.
DataGridViewRow srcrow = gridSrc.CurrentRow;
How to insert srcrow into gridDst?
thanks.
wu jianhua. |