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
HA
haneefm
Syncfusion Team
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,
Haneef
JB
James Blibo
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
JS
Jeba S
Syncfusion Team
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,
Jeba.