Infragistics(R) NetAdvantage(R) Windows Forms
UltraDropDownBase Class
Members  Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : UltraDropDownBase Class

The base class for the UltraDropDown and UltraCombo control classes.

Syntax

Visual Basic (Declaration) 
Public MustInherit Class UltraDropDownBase 
   Inherits UltraGridBase
   Implements Infragistics.Shared.Serialization.ICodeDomSerializable, Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.CalcEngine.IUltraCalcParticipant, Infragistics.Win.IDropDownResizeHandleOwner, Infragistics.Win.IFilterableValueList, Infragistics.Win.IProvideItemImageSize, Infragistics.Win.ISelectionManager, Infragistics.Win.ISupportPresets, Infragistics.Win.IUIElementProvider, Infragistics.Win.IUIElementTextProvider, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement, Infragistics.Win.IValueList 
C# 
public abstract class UltraDropDownBase : UltraGridBase, Infragistics.Shared.Serialization.ICodeDomSerializable, Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.CalcEngine.IUltraCalcParticipant, Infragistics.Win.IDropDownResizeHandleOwner, Infragistics.Win.IFilterableValueList, Infragistics.Win.IProvideItemImageSize, Infragistics.Win.ISelectionManager, Infragistics.Win.ISupportPresets, Infragistics.Win.IUIElementProvider, Infragistics.Win.IUIElementTextProvider, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement, Infragistics.Win.IValueList  

Example

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

Visual BasicCopy Code
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
C#Copy Code
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;

}

Remarks

This is the base class from which UltraCombo and UltraDropDown derive.

See Also