I'm trying to implement a "floating textbox" in a datagrid and seeing
some odd results.
In my override for DataGridTextBoxColumn.Edit, I create a custom
textbox that inherits from Textbox. I don't call edit for the base
class. I set the CustomTextBox.Parent to
Me.DataGridTableStyle.DataGrid.Parent. The "parent" is a panel that
the datagrid lives on. This seems to allow the CustomTextBox to
capture all the normal edit keys without having them picked up by the
datagrid.
The problem comes when I'm done editing with the custom text box. I
handle this in the Leave event for the custom text box. I've tried
setting the parent to nothing and also disposing of the custom
textbox. What I'm seeing is that all key processing for the datagrid
seems to be disabled from that point onward. I'm overriding
ProcessCmdKey for the datagrid and I don't get any keys picked up
there once I'm done editing in the custom textbox.
I've spent a long time trying to get this to work and would greatly
appreciate any help. I've got the floating textbox example from
Syncfusion but it does not do what I need.
Thanks Much,
Gene H.
|