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
Solved

Datagridview row not accepting changes

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

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
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…

829 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