Grouping Engine Events Demo

This sample allows you to display an event log that will show the order of various events related to the grouping engine. You will be able to trace various grouping engine events like Group Added, Group Collapsed, Group Expanded, Record Collapsed, Record Expanded, Record Value Changed, Binding Context Changed, etc.

The sample contains a class called Tracer that is used to hook up the events that are in demand and to unhook events as well. This class contains HookEngEvents and HookEngTableEvents, which provide the event handlers for the grouping engine events and the GroupingEngine.Table events. The UnHookEvents method is called when you want to disable tracing.

The event log is displayed in the output window that is shown is a list box control. The AppendOutput method of the Tracer is used to send the results to the list box control for display.

Given below is an image of the sample.

GroupingEngineEvents screenshot

Here is the code to hook up an event:

    		this.groupingEngine.GroupCollapsed+=new GroupEventHandler(groupingEngine_GroupCollapsed);  

Here is the code to unhook the event:

    		this.groupingEngine.GroupCollapsed-=new GroupEventHandler(groupingEngine_GroupCollapsed);  

Here is the code to add an event handler:

    		private void groupingEngine_GroupCollapsed(object sender, GroupEventArgs e)
    		{
    			AppendOutput("GroupCollapsed",e);
    		}