Control the ComboDropDown behavior
Hi,
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 [email protected]
Thanks,
SIGN IN To post a reply.
5 Replies
KP
Khoi Phan
March 16, 2005 10:28 PM UTC
Can someone help me on this please??? Or if it''s not doable, please let me know so I can try different approach.
AD
Administrator
Syncfusion Team
March 17, 2005 03:20 PM UTC
Hi Khoi,
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.
Regards,
Gregory Austin
Syncfusion Inc.
KP
Khoi Phan
March 17, 2005 06:07 PM UTC
Hi,
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
End Sub
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.
Attachment:
ACSEditor_2948.zip
AD
Administrator
Syncfusion Team
March 21, 2005 04:24 PM UTC
Hi Khoi,
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.
ACSEditor_3739.zip
Regards,
Gregory Austin
Syncfusion Inc.
AD
Administrator
Syncfusion Team
March 21, 2005 07:56 PM UTC
Thanks a lot for this perfect solution to my problem, Gregory.
Khoi
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
KP Khoi Phan
- Mar 16, 2005 08:11 PM UTC
- Mar 21, 2005 07:56 PM UTC