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.

Paint in GGC Client Area

Thread ID:

Created:

Updated:

Platform:

Replies:

69175 Oct 17,2007 10:44 AM Oct 24,2007 05:17 PM Windows Forms 3
loading
Tags: GridControl
Franz Gsell
Asked On October 17, 2007 10:44 AM

Hi,

I am wondering if this is possible: If there is no data available for my GGC the I want to paint in the client rectangle of the grid (TableControl?) and write a text message like - "No data available". In this case I don't want to see any grid line (but the column headers).

Any idea?

Cheers,
Franz

haneefm [Syncfusion]
Replied On October 17, 2007 11:12 AM

Hi Franz,

You will have to use the custom engine and derive the GridTableControl, overriding OnPaint method and draw the required Image to get an image stay on the GroupingGrid.

Here is a sample for implementing it.
http://www.syncfusion.com/Support/user/uploads/GGCNoRecordBackImage_68fe9286.zip

Best regards,
Haneef

Franz Gsell
Replied On October 19, 2007 05:04 AM

Hi Haneef,

thanks for your solution - it is working perfectly. Nevertheless I have got a question on the GridEngineFactory. As I understand your sample the GridEngineFactory is a static object which applies then to all GGC in this process. Now i have multiple user controls in the same process (application) with grid control which should not view the "no result data) string. How can I apply this only to specific GGC in the application?

Cheers,
Franz

haneefm [Syncfusion]
Replied On October 24, 2007 05:17 PM

Hi Franz,

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.

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

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() );
}

Best regards,
Haneef

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.

;