Solved

Get current value of cell in bound datagridview

Posted on 2011-03-23
4
566 Views
Last Modified: 2012-05-11
I have a bound (List of (object)) datagridview with one column that is editable. I need to get the current value of the edited cell. At the moment it either returns me the value from the underlying dataset or in a different editmode it updates the underlying dataset and therefore I don't know if the row has been edited. I don't want to update the whole object as this would be take too much time. What is the best way of handling this?
0
Comment
Question by:suroma
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:Imran Javed Zia
ID: 35198168
Hi,
you can use RowUpdated event if you want to get row index after update the object and here you can get changed values

alternatively you can use RowUpdating event and get can use e.rowindex to get grid row and then get related object and manually call update method.
Thanks
0
 

Author Comment

by:suroma
ID: 35199135
The datagridview does not have those events. The column being updated is a checkbox column.
0
 
LVL 16

Accepted Solution

by:
Imran Javed Zia earned 500 total points
ID: 35199165
Sorry, I posted for GridView,
Anyhow you can use checkbox click event too for this purpose
0
 

Author Comment

by:suroma
ID: 35378990
OK I will. I should be able to check it out in a few days as this task has slipped down the priorities. Thanks.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question