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

Grid Printing problem

Thread ID:





17954 Aug 20,2004 08:38 AM UTC Aug 20,2004 08:48 PM UTC WinForms 5
Tags: GridControl
Suresh Mani
Asked On August 20, 2004 08:38 AM UTC

Hi, I am trying to print the grid which span’s multiple pages on width and height. I am using the method specified in the following link, http://www.syncfusion.com/support/forums/message.aspx?MessageID=13328 But, while using this logic, the grid column and headers are clipped or not printed. Can you tell me how to resolve the problem? Here i attached a sample application for your reference. Thanks, Suresh Mani. PrintGrid_3247.zip

Administrator [Syncfusion]
Replied On August 20, 2004 09:06 AM UTC

I think the point of that forum thread was to clip the grid so not all of it would show. If you want to see the grid printed across multiple pages showing headers on each page, why are you not using the standard grid support for printing which prints across multiple pages showing headers on each page? You can see this in any of the grid\samples\CellTypes samples with the PrintPreview button. Or, it is also discussed in this kb. http://www.syncfusion.com/Support/article.aspx?id=10067

Desis Machino
Replied On August 20, 2004 01:21 PM UTC

We would certainly like to use the GridPrintDocument, however, we have multiple grids displayed on a form and many of them span a few pages (widthwise). Ultimately what I would like is to print all grids as they appear in the gui. Basically, the user could take the printed pages and paste them together to see what they can see on the gui. If I could clip certain pieces of the grid, then I can build this image myself. But, (as in the example) this is not working for us. Can you help with this, or do you have an idea of another approach we can use to accomplish this task? Thanks.

Administrator [Syncfusion]
Replied On August 20, 2004 02:26 PM UTC

In you code, the reason the headers are clipped is because of these two lines. m_prGrid.GridBounds = new Rectangle(0, 0, 600, 300); e.Graphics.IntersectClip(new Rectangle(10, 10, 700-50, 700-50)); The grid starts at location 0,0, but your clipping rectangle is soecified to start at 10, 10. So, a little piece of the headers is being clipped. If you change teh grid''s location to start at 10,10, the grid will no longer be clipped. One other thing that that you need to do is to call m_prGrid.ResetGridBounds(); at the bottom of the OnPrintPage code to make sure the grid bounds is reset to the defaults for the next time the grid is drawn. But I don''t think this will be an easy way to draw serveral grids across several pages. I think hiding columns will be simpler. I will try to post a sample later in the next couple of days on how you might do this with hidden columns.

Desis Machino
Replied On August 20, 2004 03:07 PM UTC

Thanks for your help on that, I will try that. Aslo, I was looking at the sample you pointed us to, and I think we can solve our problem, by temporarily adding all our grids to a single grid using the example Grid In Cells. That is what is done in the GridsinCells examples and it works great. However, in the example, all the grids appear on a single page. I changed the sample so that the 20x20 grid spans from colums 2-13. When I did that and then clicked on PrintPreview, and looked at the second page in the Preview, the 20x20 grid does not appear correctly (some columns and rows do not appear). If there is anything I can do to fix this, this will help us resolve this issue. Also, if you cannot reproduce this, I can send you the modified code I have of the sample. Thanks.

Administrator [Syncfusion]
Replied On August 20, 2004 08:48 PM UTC

Here is a sample that displays a grid in a particular rectangle on the output page and allows it to print on additional pages. PrintGrid_1978.zip


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

or the page will be automatically redirected to 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