Version

MaxDropDownItems Property

Determines the maximum number of dropdown items that will display in the list at one time.
Syntax
'Declaration
 
Public Property MaxDropDownItems As Integer
public int MaxDropDownItems {get; set;}
Remarks

MaxDropDownItems determines the maximum number of items that will display on the list at one time. If there are more items on the list than can be shown, then the scrollbar will be shown. If there are less items on the list, then the dropdown will size to the exact number of items or the MinDropDownItems setting, whichever is higher. This provides a way for you to limit the height of the dropdown.

Attempting to set MaxDropDownItems to a value less than 0 or MinDropDownItems will raise an System.ArgumentOutOfRangeException exception.

Example
Following code initializes the ultraCombo1. It sets some of the commonly used properties of UltraCombo.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

      Me.oleDbDataAdapter1.Fill(Me.DataSet11)

      ' Following code initializes the control.

      ' Bind the combo to a data source.
      Me.ultraCombo1.DataSource = Me.DataSet11
      Me.ultraCombo1.DataMember = ""

      ' Set the ValueMember and DisplayMember to appropriate column keys.
      Me.ultraCombo1.ValueMember = "ProductID"
      Me.ultraCombo1.DisplayMember = "ProductName"

      ' Set the border style of the edit portion by setting BorderStyle property
      ' off the UltraCombo. BorderStyle property off the DisplayLayout is for
      ' the border of the drop down window.
      Me.ultraCombo1.BorderStyle = UIElementBorderStyle.Solid
      Me.ultraCombo1.DisplayLayout.BorderStyle = UIElementBorderStyle.Solid

      ' Turn on the auto-editing. With this turned on, the UltraCombo will
      ' automatically find a matching item as the user types in.
      Me.ultraCombo1.AutoEdit = True

      ' Set the drop down style.
      Me.ultraCombo1.DropDownStyle = UltraComboStyle.DropDown

      ' Set the appearance of the UltraCombo's edit portion.
      Me.ultraCombo1.Appearance.FontData.Bold = DefaultableBoolean.True
      Me.ultraCombo1.Appearance.ForeColor = Color.Maroon

      ' Set the appearance of the UltraCombo's drop down portion.
      Me.ultraCombo1.DisplayLayout.Appearance.ForeColor = Color.DarkBlue

      ' Set the min and max drop down items.
      Me.ultraCombo1.MinDropDownItems = 5
      Me.ultraCombo1.MaxDropDownItems = 10

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void Form1_Load(object sender, System.EventArgs e)
{

	this.oleDbDataAdapter1.Fill( this.dataSet11 );
	this.oleDbDataAdapter2.Fill( this.dataSet21 );
	this.oleDbDataAdapter3.Fill( this.dataSet21 );
	this.oleDbDataAdapter4.Fill( this.dataSet21 );

	// Following code initializes the control.

	// Bind the combo to a data source.
	this.ultraCombo1.DataSource = this.dataSet11;
	this.ultraCombo1.DataMember = "";

	// Set the ValueMember and DisplayMember to appropriate column keys.
	this.ultraCombo1.ValueMember   = "ProductID";
	this.ultraCombo1.DisplayMember = "ProductName";

	// Set the border style of the edit portion by setting BorderStyle property
	// off the UltraCombo. BorderStyle property off the DisplayLayout is for
	// the border of the drop down window.
	this.ultraCombo1.BorderStyle = UIElementBorderStyle.Solid;
	this.ultraCombo1.DisplayLayout.BorderStyle = UIElementBorderStyle.Solid;
	
	// Turn on the auto-editing. With this turned on, the UltraCombo will
	// automatically find a matching item as the user types in.
	this.ultraCombo1.AutoEdit = true;

	// Set the drop down style.
	this.ultraCombo1.DropDownStyle = UltraComboStyle.DropDown;

	// Set the appearance of the UltraCombo's edit portion.
	this.ultraCombo1.Appearance.FontData.Bold = DefaultableBoolean.True;
	this.ultraCombo1.Appearance.ForeColor = Color.Maroon;

	// Set the appearance of the UltraCombo's drop down portion.
	this.ultraCombo1.DisplayLayout.Appearance.ForeColor = Color.DarkBlue;

	// Set the min and max drop down items.
	this.ultraCombo1.MinDropDownItems = 5;
	this.ultraCombo1.MaxDropDownItems = 10;

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also