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. Image for the cookie policy date

Paint in GGC Client Area

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

3 Replies

HA haneefm Syncfusion Team October 17, 2007 03:12 PM UTC

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


FG Franz Gsell October 19, 2007 09:04 AM UTC

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


HA haneefm Syncfusion Team October 24, 2007 09:17 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon