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.

Issue with printing PerformanceGrid.

Thread ID:

Created:

Updated:

Platform:

Replies:

36356 Oct 27,2005 12:18 PM Apr 18,2006 02:34 AM Windows Forms 8
loading
Tags: GridControl
Mike
Asked On October 27, 2005 12:18 PM

I''m using PerformanceGrid. Showing Print Preview and Printing this print reveales this problem shown in the attached picture. Basically a smaller grid draws in the left top corner and grid''s empty table draws on the entire page. Is there any remedy to this? Thanks

PerformanceGridPrintOreviewProblem.zip

Administrator [Syncfusion]
Replied On October 27, 2005 12:28 PM

Do you have the UseGDI set true? If so, turn it off to see if that takes care of this problem. If so, then in the derived grid you can conditionally ignore the UseGDI in OnDrawCellDisplayText. This way GDI would be used when the display is the screen and GDI+ would be used for printing.
protected override void OnDrawCellDisplayText(GridDrawCellDisplayTextEventArgs e)
{
	base.OnDrawCellDisplayText (e);
		if (!UseGDI || e.Cancel || PrintingMode)
		return;

	e.Cancel = GridGdiPaint.Instance.DrawText(e.Graphics, e.DisplayText, e.TextRectangle, e.Style);
}

Mike
Replied On October 27, 2005 12:56 PM

Definitely fixes the main problem. Thanks! The minor problem is some cells get clipped with ... On the screen the cell contents don''t get clipped. Any suggestions? Thanks

MinorPrintingIssue.zip

Administrator [Syncfusion]
Replied On October 27, 2005 01:42 PM

You can probably turn off the .... through a style setting. grid.TableStyle.Trimming = StringTrimming.None; But this may clip some of the text (or it may not). If it does, you could try making the column 1 or 2 pixels wider. Or, you could turn off UseGDI and then call grid.ColWidths.ResizeToFit, and then turn UseGDI back on to see if this would avoid the problem.

Administrator [Syncfusion]
Replied On October 27, 2005 03:45 PM

I do not think I can use FitToSize on my virtual grid. I think I need to build my own print document. It''ll allow me to take a snapshot of the grid data and control the sizes of the columns & print font. Do you guys have any sample that would implement these requirements; creates a print document for the grid but uses custom painting of the data? Thanks

Administrator [Syncfusion]
Replied On October 27, 2005 05:06 PM

In the grid KB there is a category name Quick Start-Printing. It has several samples on doing some customized printing. Here is one link, some of the others may also be helpful. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=63

Administrator [Syncfusion]
Replied On April 14, 2006 01:39 AM

hi, can someone please post sample code for printing the performance grid using GDI. thanks in advance

Administrator [Syncfusion]
Replied On April 18, 2006 12:47 AM

using the same Performance grid sample, Im having a strange problem where the values on the grid disappear when the Print dialog box shows up. Not all the values but only the ones overlapping the print dialog. Print dialog works like an eraser :) Any clues on fixing this problem ? Thanks in advance, Sunny

Administrator [Syncfusion]
Replied On April 18, 2006 02:34 AM

Hi Sunny, Here is the sample which, prints the performance grid sample fine here. Please try it and let us know if this helps. Sample : PerformanceGrid Best regards, Madhan

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.

;