tags:

views:

498

answers:

1

I am in need to add row to the dataview My code is as follows

DataGridViewSelectedRowCollection row = dataGridView1.SelectedRows; 
for (int o = 0; o < row.Count; o++) 
{ 
  DataRow myRow; 
  myRow = (row[o].DataBoundItem as DataRowView).Row; 

  DataRowView drv = dv2.AddNew(); 
  drv = row[o].DataBoundItem as DataRowView; 

}

It add just blank rows in debug mode i can see data in those rows but they just don't show on datagridview

Any help is very welcome

+2  A: 

Your question is not very clear but it would probably be simpler to add the row to whatever you are databinding to before binding and then it should already be there.

YonahW