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.

How adjust the size of DropdownContainer

Thread ID:

Created:

Updated:

Platform:

Replies:

28362 Apr 29,2005 02:10 PM Apr 29,2005 08:51 PM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On April 29, 2005 02:10 PM

Hello, I am using a DropDownGrid in my application. I am having problems setting the size of DropDownContainer same as the size of GridControl it contains (to avoid any scrollbars). I would appreciate any suggestions. protected override void InitializeDropDownContainer() { base.InitializeDropDownContainer(); this.DropDownContainer.Width = grid.Width; this.DropDownContainer.Height = grid.Height; this.DropDownContainer.IgnoreDialogKey = true; }

Administrator [Syncfusion]
Replied On April 29, 2005 04:19 PM

In the renderer''s constructor, try subscribing to the grid''s CurrentCellShowingDropDown event. (It is this event where you can control the dropdown''s size.
public DropDownGridCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
	: base(grid, cellModel)
{
	this.DisableTextBox = true;
	DropDownButton = new GridCellComboBoxButton(this);
	this.grid = null;
	grid.CurrentCellShowingDropDown += new GridCurrentCellShowingDropDownEventHandler(grid_CurrentCellShowingDropDown);
}


private void grid_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
{
	e.Size = new Size(this.Grid.Width, this.Grid.Height);
}

Administrator [Syncfusion]
Replied On April 29, 2005 08:51 PM

Thanks Clay it worked

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.

;