Hi,
I have a PopupMenutool which is used as context menu for a grid, using ultraToolbarsManager1.SetContextMenuUltra (right click on a cell in a grid). We have a drop down tool inside the PopupMenutool. Right click on the grid, the PopupMenuTool show up. However I need 2 click to make the drop down tool expand.
Is this a bug of Infrasgistic? Do we have anyway to overcome this issue?
Hi Kim,
I built a small sample in which I added an UltraCombo to a PopupMenuTool. In this sample, the behavior is correct. Please try it out and let me know if you observe the same behavior. If this sample is not an accurate representation of your application, please modify it to better model your use case.
Thanks Mike,
I figured out the solution already. My case is more complicated than this sample.
I have a base class GridControl.cs(this control contains the grid), the "GridPopupMenu" is created in this base class. Other forms will use this GridControl.
In BeforeToolDropdown event in GridControl.cs, I use this
ultraToolbarsManager1.Tools["KeyDropDown"].SharedProps.Visible = false;
And in the other forms, I set the visibility to true or false based on some specific condition.
My solution is to remove that line ultraToolbarsManager1.Tools["KeyDropDown"].SharedProps.Visible = false;. And set the Visible property to false directly in the designer. The issue is fixed.
I cannot explain why this solution works. Thanks for your help
It's good to hear that you have this working. It's possible that the cause is related to the timing with which the Visible property gets set. Something unexpected could happen if the user clicks on the tool and then it has its visibility toggled.