Hi,
I was trying to use the UltraPrintPreview control to print the grid. On my main form, I have a UltraGrid and a button that will trigger the function to print the grid with a UltraPrintPreview control:
--------------code start-----------------------UltraGridPrintDocument^ doc = gcnew UltraGridPrintDocument(); doc->FitWidthToPages = 1; doc->Page->Margins->Top = 0.5; doc->Page->Margins->Bottom = 0.5; doc->Page->Margins->Left = 0.5; doc->Page->Margins->Right = 0.5; doc->Grid = this->ultraGrid1; doc->Header->TextCenter = "Title"; doc->Header->TextRight = "Name"; doc->Header->Height = -1; doc->PageBody->Margins->Top = 15; Infragistics::Win::Printing::UltraPrintPreviewDialog^ dialog = gcnew Infragistics::Win::Printing::UltraPrintPreviewDialog(); dialog->Document = doc; dialog->ShowDialog(this); dialog->Document = nullptr; delete doc; delete dialog; doc = nullptr; dialog = nullptr;--------------end of code---------------------------------
Everything works as expected if I maximized the main form (parent window) when clicking the print button. But if the main form was not maximized when the print button was click, the grid will not auto resize according to the paper - it seems that it will just resize according to the PrintPreviewDialog's size: I've also tried setting the UltraPrintPreviewDialog's window state to Maximized before calling ShowDialog(), but it doesn't have any effects on the grid resizing. It seems like as long as the parent window is not maximized when the UltraPrintPreviewDialog was created, the grid will not resize correctly no matter what. Is this a bug or am I missing something? Thanks!
In that case, I recommend that you create a small sample project which demonstrates the issue and Submit an incident to Infragistics Developer Support so they can check it out.
Mike,
I've managed to installed the latest 8.1.20081.2123 hot fix, but it still has the same print sizing problem. Any ideas?
No, that certainly does not sound right. I'm afraid I don't know much about the Hot Fix installer, though. If that's not working correctly, you will need to Submit an incident to Infragistics Developer Support.
Hi Mike,
I'm using 2008.1 library and I've tried installing the NetAdvantage_20081_CLR2X_HotFix_2123 today, however, after the install, my DLLs installed in "Program Files" is still 8.1.20081.2033. Is this normal? The install doesn't show any Error and shows install successful upon finish.
Do you have the latest Hot Fix? I think this might be a bug that was fixed a while ago.
If the latest Hot Fix does not help, you should Submit an incident to Infragistics Developer Support.