Making a Button stay depressed in a DataGridView

curiouswebster used Ask the Experts™
I want a button called "Edit" in the first column of my DataGridView which will signify that the row is being edited, and no other row can be edited as they display in a color showing read only mode.  When the user clicks Edit for another row, my dialog will verify the data's okay in the row just edited, and make that button no longer depressed.  Only one Edit button can be depressed at a time.

How do I handle this inside a DataGridView?  The button is of type DataGridViewDisableButtonColumn() and is working fine within the DataGridView, but I need to add this new behaviour and am not quite sure where to add it.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You may have to overload the DataGridView or maybe you can get away with just the column, and add the custom functionality that way.

There are also 3rd party DataGridView controls that make things like this a lot easier. See this link for suggestions:
curiouswebsterSoftware Engineer



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial