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
close icon

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 08:19 PM UTC

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 30, 2005 12:51 AM UTC

Thanks Clay it worked

Loader.
Live Chat Icon For mobile
Up arrow icon