I'm trying to do some custom UI behavior on a Windows Forms PropertyGrid control. I'd like to be able to respond to clicks and double-clicks on the GridItems to change the state. For example, to flip a binary or ternary variable through its states.
I can get at the underlying view by looking up a child of typename "PropertyGridView" and can hook its Click event. Only problem is then what do I do? I can't find any functions that map mouse coordinates onto grid items.
There is a SelectedGridItem but this isn't helpful. There are many places you can click on a control that do not update this property, and so responding to a Click assuming SelectedGridItem is updated will get a lot of incorrect results.
Aside from purchasing a commercial property grid control or switching to a gridview of some kind, is there anything I can do here? The PropertyGrid is almost exactly what I need. I'm even considering wandering through with Reflector and doing some very unfriendly things with this control to get the data out that I need. :)
More info: I do know about using custom UITypeEditor classes, and am already doing this in other areas (color picker). Unfortunately doing custom UI work requires an extra click (to browse or drop-down some UI). For example, I have embedded a checkbox using UITypeEditor.PaintValue and would really like to be able to just click on it to check/uncheck.