DataGridview - Avoid Row UnSharing

A

Ashutosh

Hi,
I read this article about datagrid view.
http://msdn.microsoft.com/en-us/library/ha5xt0d9.aspx

I haver over 50,000 items in my dataGridView (which is bound to a data
table) and I want to avoid row unsharing. But I need to handle some data grid
events like "CellMouseClick" and want to do some processing.

But the issue is that for all the events, I get only the row and column
Index. If I access the row or cell using the indexes, the row becomes
un-shared. Something like this "dgvContactList.Rows[e.RowIndex]"

So, how do I retrieve the underlying row (Not interested in the column/cell)
either DataGridViewRow or DataRow (I understand that DataRow can be retrieved
from DataGriedViewRow :) )?

Thanks & Regards,
Ashutosh
 
A

Ashutosh

Even retrieving the row using the SharedRow method, something like this

DataGridViewRow r = dataGridView1.Rows.SharedRow(e.RowIndex);

doesn't help as using this row object, I can't get the value in the
cell/rows nor the underlying data row object.


Regards,
Ashutosh
 

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