Solved

Get current value of cell in bound datagridview

Posted on 2011-03-23
4
569 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel Web Add-in Where is Visual Basic used 9 81
SQL Server Serialization error 8 46
GET INFO ABOUT WHAT THE PRINTER IS DOING ? 11 76
async questions 5 48
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decadeā€¦

734 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