We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DIfferent alternative for specifying custom grouping engine

Thread ID:





60805 May 11,2007 05:52 PM UTC May 29,2007 08:04 AM UTC WinForms 3
Tags: Grouping
James Blibo
Asked On May 11, 2007 05:52 PM UTC

Is there another way for specifying custom engine, perhaps by setting a property.

When I try to mess with the deigner generated code by doing this...

this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl(new GroupingEngine());

the VS designer is replacing it with this...

this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl();

How can I set the engine without messing with the deginer code

haneefm [Syncfusion]
Replied On May 11, 2007 11:15 PM UTC

Hi James,

By default, The grid has only two ways to attach a custom grouping engine to the grid. The first technique is GridEngineFactory.Factory property that holds the custom grouping engine for all grid in an application. The second technique is GridGroupingControl constructor that holds the custom grouping engine for a grid.

The GridGroupingControl.Engine property used to get or initialize the engine object which maintains all TableDescriptors and tables to be displayed in the grid control.

When you assign a GridEngine object using this property, the existing engine object is not replaced. Instead all properties and collections are copied from the assigned engine object using the GridEngine.InitializeFrom method. GridEngine.InitializeFrom method initializes the object and copies properties from another object. PropertyChanging and PropertyChanged events are raised for every property that is modified. If both objects are equal, no events are raised.

Best regards,

James Blibo
Replied On May 16, 2007 09:00 PM UTC

Just can't figure out the construct...

If you have two ggcs on the same form and two different custom engines, what is the syntax for specifying that each ggc using a different engine using the GridEngineFactory.Factory construct.

How can I do something like ...
GridEngineFactory.Factory = new GroupingEngineFactory();

for each ggc in the form ctor

Jeba S [Syncfusion]
Replied On May 29, 2007 08:04 AM UTC

Hi James,

You need to pass the GridEngine object to the GroupingControl constructor in Form's IntializeComponet method. Here is a code snippet.

private void InitializeComponent()
this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl( new CustomGroupingEngineFactory1().CreateEngine() );
this.gridGroupingControl2 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl(CustomGroupingEngineFactory2().CreateEngine() );

Kindly let us know if this helps.

Best Regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon