Solved

Datagridview row not accepting changes

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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 video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 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

20 Experts available now in Live!

Get 1:1 Help Now