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

slow startup of print preview form

Hello there!

I've recently implemented Print and Print Preview functionality for our SyncFusion Grid application.

However, the print preview dialog takes around 10 seconds to appear, on the call to .Show, even with an empty grid.

It's a virtual grid - the final three seconds are spent generating 2300 calls to our OnQueryCellInfo() handler. But what about the seven seconds before that?

Any ideas or clues gratefully received,

Thanks,

Jonathan

3 Replies

AD Administrator Syncfusion Team December 8, 2006 09:30 AM UTC

I added the button handler below to the VirtualGrid sample that we ship with the product. Using both .NET 2.0 and 1.1, the dialog appears essentially instantly, and the preview pages start generating as indicated by the little counter window that appears. Are you doing something differently? Do the sample exhibit the sample behavior on your system?

One possible explanation is that there is some kind of time-out going on as the framework looks for a printer on your system. Does your system have a default printer setup and is it connected? Have you tried your code on other systems that might be using a directly connected printer?


private void button1_Click(object sender, EventArgs e)
{
GridPrintDocument pd = new GridPrintDocument(this.gridControl1);
PrintPreviewDialog dlg = new PrintPreviewDialog();
dlg.Document = pd;
dlg.ShowDialog();
}


AD Administrator Syncfusion Team December 8, 2006 09:30 AM UTC

I added the button handler below to the VirtualGrid sample that we ship with the product. Using both .NET 2.0 and 1.1, the dialog appears essentially instantly, and the preview pages start generating as indicated by the little counter window that appears. Are you doing something differently? Do the sample exhibit the sample behavior on your system?

One possible explanation is that there is some kind of time-out going on as the framework looks for a printer on your system. Does your system have a default printer setup and is it connected? Have you tried your code on other systems that might be using a directly connected printer?


private void button1_Click(object sender, EventArgs e)
{
GridPrintDocument pd = new GridPrintDocument(this.gridControl1);
PrintPreviewDialog dlg = new PrintPreviewDialog();
dlg.Document = pd;
dlg.ShowDialog();
}


JH Jonathan Hartley December 8, 2006 01:56 PM UTC

Thanks for the input, Clay.

The print preview dialog appears instantly, but the major delay is before it starts displaying 'generating page 1' (or whatever). It's only in the latter 3 seconds that it displays the page generation messages, while it starts calling our 'onqueryCellInfo', etc.

Thanks for the things you suggest, I'll try them out and report back.

Loader.
Live Chat Icon For mobile
Up arrow icon