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

How adjust the size of DropdownContainer

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; }

2 Replies

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


AD Administrator Syncfusion Team April 29, 2005 07:51 PM

Thanks Clay it worked

Loader.
Live Chat Icon For mobile
Up arrow icon