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. Image for the cookie policy date

GDBG with filterbar in a ComboDropDown

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

6 Replies

AD Administrator Syncfusion Team April 4, 2005 02:03 PM

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


AD Administrator Syncfusion Team April 4, 2005 02:13 PM

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


AD Administrator Syncfusion Team April 4, 2005 03: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();
	}


}


MS Mick Speake April 5, 2005 02: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


AD Administrator Syncfusion Team April 5, 2005 03: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.


MS Mick Speake April 5, 2005 10: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

Loader.
Live Chat Icon For mobile
Up arrow icon