'Declaration Protected Overridable Sub OnBeforeDropDown( _ ByVal e As CancelableDropDownEventArgs _ )
protected virtual void OnBeforeDropDown( CancelableDropDownEventArgs e )
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraDropDown1_BeforeDropDown(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ultraDropDown1.BeforeDropDown ' BeforeDropDown gets fired right before the drop down is about to drop down. ' This event also gives you a chance to prevent it from dropping down ' by setting Cancel property off the passed in event args to false. ' Following code sets the appearnace of rows in the UltraDropDown to the ' appearance of the cell in the UltraGrid that the UltraDropDown is being ' dropped down in. If Not Nothing Is Me.ultraGrid1.ActiveCell AndAlso _ Me.ultraGrid1.ActiveCell.IsInEditMode AndAlso _ Me.ultraGrid1.ActiveCell.Column.ValueList Is Me.ultraDropDown1 Then ' Get the appearance of the cell in the UltraGrid that's in edit mode. Dim appData As AppearanceData = New AppearanceData() Me.ultraGrid1.ActiveCell.ResolveAppearance(appData) ' Set the appearance of rows in the UltraDropDown to that appearance. Me.ultraDropDown1.DisplayLayout.Override.RowAppearance = New Infragistics.Win.Appearance(appData) End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void ultraDropDown1_BeforeDropDown(object sender, System.ComponentModel.CancelEventArgs e) { // BeforeDropDown gets fired right before the drop down is about to drop down. // This event also gives you a chance to prevent it from dropping down // by setting Cancel property off the passed in event args to false. // Following code sets the appearnace of rows in the UltraDropDown to the // appearance of the cell in the UltraGrid that the UltraDropDown is being // dropped down in. if ( null != this.ultraGrid1.ActiveCell && this.ultraGrid1.ActiveCell.IsInEditMode && this.ultraGrid1.ActiveCell.Column.ValueList == this.ultraDropDown1 ) { // Get the appearance of the cell in the UltraGrid that's in edit mode. AppearanceData appData = new AppearanceData( ); this.ultraGrid1.ActiveCell.ResolveAppearance( ref appData ); // Set the appearance of rows in the UltraDropDown to that appearance. this.ultraDropDown1.DisplayLayout.Override.RowAppearance = new Infragistics.Win.Appearance( ref appData ); } }
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