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.
Unfortunately, activation email could not send to your email. Please try again.

Custom Grouping Engine and multiple ggcs on the same form

Thread ID:

Created:

Updated:

Platform:

Replies:

54112 Dec 31,2006 01:48 PM Sep 19,2008 10:13 AM Windows Forms 5
loading
Tags: Grouping
James Blibo
Asked On December 31, 2006 01:48 PM

I have a custom grouping engine that the main ggc in my form uses. I have added another ggc to the form. I do not want this ggc to use this custom engine. However, I do not know how to link a ggc with a specific grouping engine.

I have this in the ctor...
GridEngineFactory.Factory = new GroupingEngineFactory();

which corrrectly applies to the first ggc, but I do not want the second ggc to use this engine. How do I go about this?

Administrator [Syncfusion]
Replied On January 3, 2007 03:59 PM

Hi James,

Thank you for being patience.

This can be achieved by passing the GridEngine ( Custom engine ) to the respective groupingControl. Please try the following code snippet and let us know if you need any further assistance.

>>>>>>>>>Code Snippet<<<<<<<<<
GroupingEngineFactory gf = new GroupingEngineFactory();
GridGroupingControl grid1 = new GridGroupingControl(gf.CreateEngine());
>>>>>>>>>>>>>><<<<<<<<<<<<<<

Have a nice day.

Best regards,
Madhan

Ankit Thakkar
Replied On September 18, 2008 05:06 AM

Hi,
I am using Grid Control in my application and using Custom Engine to add 2 extra sections on top of my grid. But the problem comes when custom engine is used in one form and keeping the same form open, i open one more form in my application. Somehow, it is adding extra sections in the other form even if i do not initialize the grid with custom engine in that form.

Any help would be highly appreciated...
many thanks,
Ankit

>I have a custom grouping engine that the main ggc in my form uses. I have added another ggc to the form. I do not want this ggc to use this custom engine. However, I do not know how to link a ggc with a specific grouping engine.

I have this in the ctor...
GridEngineFactory.Factory = new GroupingEngineFactory();

which corrrectly applies to the first ggc, but I do not want the second ggc to use this engine. How do I go about this?



SubhaSheela R [Syncfusion]
Replied On September 18, 2008 05:56 AM


Hi Ankit,

Thanks for your interest in Syncfusion products.

One way you can do this is to use a derived GridGroupingControl. In its default constructor, when you call the base class, pass in a new instance of your custom engine. So, only instances of this derived grid will use the custom engine, and it can be used in the designer since it has a default constructor that automatically sets up the custom engine.

Here is the code:


public class MyGridGroupingControl : GridGroupingControl
{
public MyGridGroupingControl()
: base(new MyCustomEngine())
{
//...
}
}


Please let us know if this will not serve your needs.

Regards,
Subhasheela R









Ankit Thakkar
Replied On September 18, 2008 12:23 PM

Hi,
Your code can be used for GridGroupingControl, but I am using GridControl in my screen. Can you please let me know what should I write to achieve this functionality in GridControl???

>
Hi Ankit,

Thanks for your interest in Syncfusion products.

One way you can do this is to use a derived GridGroupingControl. In its default constructor, when you call the base class, pass in a new instance of your custom engine. So, only instances of this derived grid will use the custom engine, and it can be used in the designer since it has a default constructor that automatically sets up the custom engine.

Here is the code:


public class MyGridGroupingControl : GridGroupingControl
{
public MyGridGroupingControl()
: base(new MyCustomEngine())
{
//...
}
}


Please let us know if this will not serve your needs.

Regards,
Subhasheela R











SubhaSheela R [Syncfusion]
Replied On September 19, 2008 10:13 AM


Hi Ankit,

Thanks for your update.

By design, Grid Control is not associated with any Engine collection as GridGrouping Control have. I am not sure whether you are deriving any Grid Control. If so, please upload us a minimal sample, so that I can help you easily.

Let me know with some more clear details if I am misunderstood your requirement.

Regards,
Subhasheela R





CONFIRMATION

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.

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.

;