'Declaration Public ReadOnly Property EventManager As DataSourceEventManager
public DataSourceEventManager EventManager {get;}
The DataSourceEventManager gives you a high degree of control over how the component invokes event procedures. You can use it to selectively enable and disable event procedures depending on the context of your application. You can also use the event manager to return information about the state of the component's events.
The event manager's methods are used to determine the enabled state of an event (DataSourceEventManager.IsEnabled), to selectively enable or disable events (DataSourceEventManager.SetEnabled), and to tell whether an event procedure is currently being processed (DataSourceEventManager.InProgress). There is also an property that you can check to quickly determine whether any events have been disabled by the event manager.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDataSource Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim eventManager As DataSourceEventManager = Me.UltraDataSource1.EventManager ' You can disable an individual event from firing. Debug.WriteLine("InitializeDataRow enabled ? " & eventManager.IsEnabled(DataSourceEventIds.InitializeDataRow)) eventManager.SetEnabled(DataSourceEventIds.InitializeDataRow, False) Debug.WriteLine("InitializeDataRow enabled ? " & eventManager.IsEnabled(DataSourceEventIds.InitializeDataRow)) ' You can also disable a group of events from firing. Debug.WriteLine("After events enabled ? " & eventManager.IsEnabled(DataSourceEventGroups.AfterEvents)) eventManager.SetEnabled(DataSourceEventGroups.AfterEvents, False) Debug.WriteLine("After events enabled ? " & eventManager.IsEnabled(DataSourceEventGroups.AfterEvents)) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDataSource; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { DataSourceEventManager eventManager = this.ultraDataSource1.EventManager; // You can disable an individual event from firing. Debug.WriteLine( "InitializeDataRow enabled ? " + eventManager.IsEnabled( DataSourceEventIds.InitializeDataRow ) ); eventManager.SetEnabled( DataSourceEventIds.InitializeDataRow, false ); Debug.WriteLine( "InitializeDataRow enabled ? " + eventManager.IsEnabled( DataSourceEventIds.InitializeDataRow ) ); // You can also disable a group of events from firing. Debug.WriteLine( "After events enabled ? " + eventManager.IsEnabled( DataSourceEventGroups.AfterEvents ) ); eventManager.SetEnabled( DataSourceEventGroups.AfterEvents, false ); Debug.WriteLine( "After events enabled ? " + eventManager.IsEnabled( DataSourceEventGroups.AfterEvents ) ); }
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
UltraDataSource Class
UltraDataSource Members
Infragistics.Shared.EventManagerBase.AllEventsEnabled