Is it possible to select a printer using the printDialog?
I have a grid that I call the PrintPreview Method on, This shows me the the print preview of my data but when I click the print button on the preview form it just prints to the default printer. I need to show a dialog to choose the printer when the button is clicked. Is there a way to do this?
public void PrintPreview()
{
uGrid.PrintPreview();
}
In Infragistics Winforms 15.1, we added a new property in UltraPrintPreviewDialog to show the PrintDialogButton. By enabling this button you can select the printer from print preview dialog. To enable this button you should do something like this.
// create an instance of a UltraGridPrintDocument.
UltraGridPrintDocument printDoc = new UltraGridPrintDocument();
// Set the UltraGridPrintDocument's Grid property to a grid
// on the form
printDoc.Grid = this.ultraGrid1;
// Set its Document property to the UltraGridPrintDocument we created above.
ultraPrintPreviewDialog1.Document = printDoc;
// set the PrintDialogButtonVisible to true.
ultraPrintPreviewDialog1.PrintDialogButtonVisible = true;
// Show the dialog modally
ultraPrintPreviewDialog1.Show();