PC Review


Reply
Thread Tools Rate Thread

DataGridview - Avoid Row UnSharing

 
 
Ashutosh
Guest
Posts: n/a
 
      5th Aug 2009
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
 
Reply With Quote
 
 
 
 
Ashutosh
Guest
Posts: n/a
 
      5th Aug 2009
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
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGridview - Avoid Row UnSharing Ashutosh Microsoft C# .NET 1 5th Aug 2009 04:21 AM
How to avoid selecting column header row in DataGridView???? Hexman Microsoft Dot NET Framework Forms 2 24th Apr 2006 06:37 PM
Avoid entering read-only column in DataGridView? =?Utf-8?B?QmlsbA==?= Microsoft Dot NET 7 10th Feb 2006 05:19 AM
Unsharing my music P Windows XP Security 2 11th Mar 2004 08:02 PM
IPC$ keeps unsharing itself? Jeff Brady Microsoft Windows 2000 Networking 2 14th Jul 2003 08:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:44 AM.