Solved

Datagridview row not accepting changes

Posted on 2014-09-24
2
200 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
[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 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

738 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