Ejemplo n.º 1
0
        private static void OnGridInitializePrintPreview(object sender, Infragistics.Win.UltraWinGrid.CancelablePrintPreviewEventArgs e)
        {
            //Event handler when a print preview is first initiated
            UltraGrid grid = (UltraGrid)sender;

            e.PrintPreviewSettings.DialogLeft   = SystemInformation.WorkingArea.X + 192;
            e.PrintPreviewSettings.DialogTop    = SystemInformation.WorkingArea.Y + 192;
            e.PrintPreviewSettings.DialogWidth  = 672;
            e.PrintPreviewSettings.DialogHeight = 480;
            e.PrintPreviewSettings.Zoom         = 1.0;

            setLogicalPageLayout(grid, e.DefaultLogicalPageLayoutInfo);
            e.PrintDocument.DocumentName        = grid.Text;
            e.PrintDocument.DefaultPageSettings = UltraGridSvc.Settings;
        }
Ejemplo n.º 2
0
        private static void OnGridInitializePrintPreview(object sender, Infragistics.Win.UltraWinGrid.CancelablePrintPreviewEventArgs e)
        {
            //Event handler when a print preview is first initiated
            UltraGrid grid = (UltraGrid)sender;

            e.PrintPreviewSettings.DialogLeft   = SystemInformation.WorkingArea.X + 192;
            e.PrintPreviewSettings.DialogTop    = SystemInformation.WorkingArea.Y + 192;
            e.PrintPreviewSettings.DialogWidth  = 672;
            e.PrintPreviewSettings.DialogHeight = 480;
            e.PrintPreviewSettings.Zoom         = 1.0;
            e.PrintLayout.Override.RowSelectors = DefaultableBoolean.False;
            e.PrintLayout.BorderStyle           = UIElementBorderStyle.None;

            setLogicalPageLayout(grid, e.DefaultLogicalPageLayoutInfo);
            e.PrintDocument.DocumentName        = grid.Text;
            e.PrintDocument.DefaultPageSettings = UltraGridPrinter.Settings;
        }
Ejemplo n.º 3
0
        private static void OnGridInitializePrintPreview(object sender, Infragistics.Win.UltraWinGrid.CancelablePrintPreviewEventArgs e)
        {
            //Event handler when a print preview is first initiated
            UltraGrid oGrid = (UltraGrid)sender;

            try {
                //Set print preview dialog attributes
                e.PrintPreviewSettings.DialogLeft   = SystemInformation.WorkingArea.X + 192;
                e.PrintPreviewSettings.DialogTop    = SystemInformation.WorkingArea.Y + 192;
                e.PrintPreviewSettings.DialogWidth  = 672;                      //SystemInformation.WorkingArea.Width;
                e.PrintPreviewSettings.DialogHeight = 480;                      //SystemInformation.WorkingArea.Height;
                e.PrintPreviewSettings.Zoom         = 1.0;

                //Set layout attributes
                setLogicalPageLayout(oGrid, e.DefaultLogicalPageLayoutInfo);

                //Set print document attributes including defualt page settings
                e.PrintDocument.DocumentName        = oGrid.Text;
                e.PrintDocument.DefaultPageSettings = UltraGridSvc.Settings;
            }
            catch (Exception ex) { throw ex; }
        }
Ejemplo n.º 4
0
        private static void OnGridInitializePrintPreview(object sender, Infragistics.Win.UltraWinGrid.CancelablePrintPreviewEventArgs e)
        {
            //Event handler when a print preview is first initiated
            //Update: Feb.01, 2005 - Top and Bottom margin was increased to 1.25 to fix repeating of last row in the second page.
            UltraGrid oGrid = (UltraGrid)sender;

            try {
                //Set print preview dialog attributes
                e.PrintPreviewSettings.DialogLeft   = SystemInformation.WorkingArea.X + 192;
                e.PrintPreviewSettings.DialogTop    = SystemInformation.WorkingArea.Y + 192;
                e.PrintPreviewSettings.DialogWidth  = 672;      //SystemInformation.WorkingArea.Width;
                e.PrintPreviewSettings.DialogHeight = 480;      //SystemInformation.WorkingArea.Height;
                e.PrintPreviewSettings.Zoom         = 1.0;

                //Set layout attributes and print document attributes including defualt page settings
                setLogicalPageLayout(oGrid, e.DefaultLogicalPageLayoutInfo);
                e.PrintDocument.DocumentName        = oGrid.Text;
                e.PrintLayout.Override.RowSelectors = DefaultableBoolean.False;
                e.PrintLayout.BorderStyle           = UIElementBorderStyle.None;
                e.PrintDocument.DefaultPageSettings = UltraGridPrinter.Settings;
            }
            catch (Exception ex) { throw ex; }
        }