I have a control that inherits from the ComboDropDown to display a grid and 2 buttons.
My problem is that when the popup container is shown and user clicks on the "GridListControl" cell of the grid, the popup container just goes away. I''d like to have more control on when the drop-down of the combodrop should go away. In fact, it should go away only when the user actually wants it to go away by pressing OK, or Cancel or just simply clicking the dropdown button.
I''ve sent an email (subject: Control the ComboDropDown behavior thread) with the sample project to firstname.lastname@example.org
Can someone help me on this please??? Or if it''s not doable, please let me know so I can try different approach.
ADAdministrator Syncfusion Team March 17, 2005 10:20 AM
I''ve been looking into this and haven''t located a solution yet. I suspect that the problem occurs because the GridListControl functions similarly to the ComboDropDown and the two Popups are conflicting with each other. I''ll let you know if I figure anything out.
KPKhoi PhanMarch 17, 2005 01:07 PM
I was able to fix the issue with the disappearance of the popup upon click on the "GridListControl" cell with this.
Private Sub grdACS_CurrentCellShowingDropDown(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridCurrentCellShowingDropDownEventArgs) Handles grdACS.CurrentCellShowingDropDown
Dim cellRenderer As Syncfusion.Windows.Forms.Grid.GridDropDownGridListControlCellRenderer = CType(Me.grdACS.CurrentCell.Renderer, Syncfusion.Windows.Forms.Grid.GridDropDownGridListControlCellRenderer)
Me.PopupContainer.CurrentPopupChild = cellRenderer.PopupControlContainer
cellRenderer.PopupControlContainer.PopupParent = Me.PopupContainer
But now the problem is that the popup of the "GridListControl" cell is not in the right place anymore. It''s displayed at the bottom of the grid.
Please let me know if you have a solution for all of those problems.
ADAdministrator Syncfusion Team March 21, 2005 11:24 AM
I''ve talked with one of our Grid experts and he''s provided me with the following solution:
To drop grids you have to use a special PopupContainer, GridDropDownContainer. To get this to work, override CreatePopupControl and return an instance of GridDropDownContainer.
Also, you have to set the parent of this DropDownContainer, say in CustomInitialize() .
Me.grdACS.DropDownContainerParent = Me.popContainer
Once you so this, you do not need any code in CurrentCellShowingDropDown. Attached is the sample with these modifications.
ADAdministrator Syncfusion Team March 21, 2005 02:56 PM
Thanks a lot for this perfect solution to my problem, Gregory.