Deleting rows from a datagridview

E

EricW

Hi,

If I delete 700 rows in an Excel sheet it takes about half a second, but
when I do the same with my databound datagridview, it takes up to 2 minutes.

Isn't there a faster way to delete selected rows in a datagridview?

My code:

For Each rw In Me.dgvImport.SelectedRows
rw.DataBoundItem.delete()
Next

rg,
Eric
 
B

Backwater Geezer

Delete from DataSource and refresh DataSource?
Not sure how much faster it will be.

MH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top