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

Align grid Right

Thread ID:





70067 Nov 26,2007 11:07 AM UTC Nov 26,2007 12:07 PM UTC WinForms 1
Tags: GridControl
mattia locatelli
Asked On November 26, 2007 11:07 AM UTC

I need to print the grid aligned on the right margin of the page. Is it possible?

Jeba S [Syncfusion]
Replied On November 26, 2007 12:07 PM UTC

Hi Me,

Thank you for your interest in Syncfusion Products.

The GridPrintDocument class contains the DefaultPageSettings.Margins property. You can use this property to control where the grid is printed. Below is the code snippets:

GridPrintDocument gp = new GridPrintDocument(this.gridControl1, true);
gp.DefaultPageSettings.Margins.Top = 100;
gp.DefaultPageSettings.Margins.Bottom =100;
gp.DefaultPageSettings.Margins.Left = 100;
gp.DefaultPageSettings.Margins.Right = 100;

The grid will try to center itself in the area allocated for it. For example if the page width is 850, and you have margins of 100 on each side, this leaves 650 width for the grid. If the whole number of columns only occupy 600, that leaves 50 extra pixels. The default behavior is to split these up, 25 on each side.

Kindly let us know if you need any further assistance.

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