We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GDBG with filterbar in a ComboDropDown

Thread ID:

Created:

Updated:

Platform:

Replies:

26952 Apr 4,2005 12:38 PM Apr 5,2005 11:56 AM Windows Forms 6
loading
Tags: GridControl
Mick Speake
Asked On April 4, 2005 12:38 PM

I am trying to simulate a multicolumncombobox with filterbar by using a gdbg with filterbar as the PopupControl of a ComboDropDown. After finally managing to get the filterbar to appear, clicking on the filterbar line causes the combobox to close rather than displaying the filter options. See the attached example. Have you any ideas how I can achieve my aims? Thanks, Mick testDrop_6590.zip

Administrator [Syncfusion]
Replied On April 4, 2005 03:03 PM

At the bottom of you LoadData routine, try adding this line: grid.DropDownContainerParent = (IGridDropDownContainer)this.comboDropDown1.PopupContainer;

Administrator [Syncfusion]
Replied On April 4, 2005 03:13 PM

This gives an InvalidCastException. Any more ideas? REgards, Mick

Administrator [Syncfusion]
Replied On April 4, 2005 04:15 PM

To handle this, you need to derive the ComboDropDown and override CreatePopupContainer. You also have to change the two occuerrences of Syncfusion.Windows.Forms.Tools.ComboDropDown in your code to MyComboDropDown to get your application to use teh derived class.
public class MyComboDropDown : Syncfusion.Windows.Forms.Tools.ComboDropDown
{
	protected override Syncfusion.Windows.Forms.PopupControlContainer CreatePopupContainer()
	{
		return new GridDropDownContainer();
	}


}

Mick Speake
Replied On April 5, 2005 03:52 AM

This almost works! However there are two problems. Each time after the comboDropDown is clicked & the grid is displayed, it takes 3 clicks to wake up the filter combos. After one wakes up, it only needs one click (until the comboDroDown is closed). Hitting Enter or ESC when a filter combo is dropped down causes the main comboDropDown to close (i.e. grid disppears) but leaving the filter combo displayed. Thanks for all your help with this, it is really appreciated. Regards, Mick

Administrator [Syncfusion]
Replied On April 5, 2005 04:24 AM

Something to try for the second problem. In the combo CloseUp event try calling grid.CurrentCell.MoveTo(-1,-1) (or maybe grid.CurrentCell.Deactivate or grid.CurrentCell.CancelEdit or ???). The idea would be to try to tell the grid to clean up the current cell. For the first problem, make sure the grid has focus and a current cell when the popup opens. maybe using code like grid.Focus();, grid.CurrentCell.MoveTo(2,1);, or ??? If you can upload a sample project showing these problems, I can try to suggest some specific solutions.

Mick Speake
Replied On April 5, 2005 11:56 AM

Hi Clay, Your suggestions make sense, however, for various reasons I''ve changed to responding to the combo''s click event & displaying a custom form that contains a GDBG. This is working fine. Thanks again for all your help. As usual, I have been very impressed with your responses. Regards, Mick

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;