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.
Up arrow icon