We are inside a WinForm using a ToolStripMenu and a DataGridView.
The DataGridView uses a Custom Cell Editor through the IDataGridViewEditingControl very similar to as described here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.idatagridvieweditingcontrol(v=vs.80).aspx
The problem is this: We are using the cells in a manor similar to MS Excel where the user can select text in a cell (editor) while it is in Edit Mode and change the font/color of the selected text.The issue is that the DataGridView's cell goes out of edit mode...and the text selection is lost.
I can determined what text is selected when focus is lost and I can restore edit mode after a font size is selected. Then I can even restore the selection of text and make the font change.
However, it looks very hokey. It is preferred that the cell just remain in edit mode if I click ANY item on a ToolStripMenu.
In comparison, if I select a ToolStripButton the cell does not leave edit mode.
So the question is...How can I keep the cell from going out of edit mode when the ToolStripComboBox is clicked?
The DataGridView uses a Custom Cell Editor through the IDataGridViewEditingControl very similar to as described here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.idatagridvieweditingcontrol(v=vs.80).aspx
The problem is this: We are using the cells in a manor similar to MS Excel where the user can select text in a cell (editor) while it is in Edit Mode and change the font/color of the selected text.The issue is that the DataGridView's cell goes out of edit mode...and the text selection is lost.
I can determined what text is selected when focus is lost and I can restore edit mode after a font size is selected. Then I can even restore the selection of text and make the font change.
However, it looks very hokey. It is preferred that the cell just remain in edit mode if I click ANY item on a ToolStripMenu.
In comparison, if I select a ToolStripButton the cell does not leave edit mode.
So the question is...How can I keep the cell from going out of edit mode when the ToolStripComboBox is clicked?
Clint