Solved

Datagridview row not accepting changes

Posted on 2014-09-24
2
193 Views
Last Modified: 2014-09-25
Hello,

I have a datagridview.  If the user is editing a row and then clicks to another control when they return to the same row then any changes they make are rejected i.e if the change a value it immediately changes back to the value prior to moving from the row,  If they click to another row and then return to the original then they are able to edit it normally.

Please could anyone explain this and suggest a solution.

Thanks
0
Comment
Question by:Petermcg001
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 40344262
You might have an event procedure that brings back the original value.

The first that comes to my mind is RowValidating that is usually used for such a purpose.

But there are so many events in that control that it can be another of them.
0
 
LVL 1

Author Closing Comment

by:Petermcg001
ID: 40344301
Thanks, your suggestion has pointed me in the right direction.  It turned out to be in the cell validating event.  I'd managed to include some code which was not assigned to a given cell index,.  I moved this and it works fine.

Thanks again.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now