Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

How to begin editing of a DataGridView cell on click?

$
0
0

Probably missing something obvious here, but if I override a cell's OnClick to start the "InitializeEditingControl" method, I get an error telling me that the "Operation is not valid due to the current state of the object."

Presumably I should be calling something else before I call InitializeEditingControl, but nothing leaps out as the correct thing to call and searching has gotten me nowhere.

I found this topic: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=795003&SiteID=1, which deals with making all cells in a DataGridView behave in this way, but I want to make only certain of my custom cells edit on enter.

Does anyone know the proper command to call to begin editing a cell and to put it in the right "state" for editing?


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>