'Declaration Public Event BeforeRowExpanded As CancelableRowEventHandler
public event CancelableRowEventHandler BeforeRowExpanded
The event handler receives an argument of type CancelableRowEventArgs containing data related to this event. The following CancelableRowEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel (Inherited from System.ComponentModel.CancelEventArgs) | |
Row | The row that the cell belongs to (read-only) |
The row argument returns a reference to an UltraGridRow object that can be used to set properties of, and invoke methods on, the row that will expand. You can use this reference to access any of the returned row's properties or methods.
The cancel argument enables you to programmatically prevent the row from expanding. This argument can be used to prevent the user from expanding a row unless a certain condition is met.
This event is generated before a row has been expanded, either programmatically, or by user interaction. A row can be expanded programmatically by setting its Expanded property to True.
The expansion (plus/minus) indicators can be hidden for a row to preventthe user from expanding or collapsing it by setting the ExpansionIndicator property.
The BeforeRowCollapsed and AfterRowCollapsed events are generated before and after, respectively, an expanded row has been collapsed.
The AfterRowExpanded event, which occurs after a row has been expanded, is generated after this event, provided cancel is not set to True.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraGrid1_BeforeRowExpanded(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CancelableRowEventArgs) Handles ultraGrid1.BeforeRowExpanded ' Before e.Row gets expanded, collapse all the previously expanded rows so we ' only have one expanded row. e.Row.ParentCollection.CollapseAll(False) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void ultraGrid1_BeforeRowExpanded(object sender, Infragistics.Win.UltraWinGrid.CancelableRowEventArgs e) { // Before e.Row gets expanded, collapse all the previously expanded rows so we // only have one expanded row. e.Row.ParentCollection.CollapseAll( false ); }
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