예제 #1
0
        public static void Print(this RadGridView grid, PrintSettings settings)
        {
            spreadsheet.Workbook = CreateWorkbook(grid, settings);
            PrintWhatSettings printWhatSettings = new PrintWhatSettings(ExportWhat.ActiveSheet, false);

            spreadsheet.Print(printWhatSettings);
        }
예제 #2
0
        protected virtual void PrintButton_Click(object sender, EventArgs e)
        {
            if (this.gridControl.MasterViewInfo.IsWaiting)
            {
                RadMessageBox.Show("The Data is not loaded! Please wait!");
                return;
            }

            var spreadsheet = new RadSpreadsheet();
            var window      = new Form()
            {
                Width = 0, Height = 0, Opacity = 0
            };

            spreadsheet.Parent = window;
            window.Show();
            spreadsheet.Workbook = CreateWorkbook();
            spreadsheet.Print(new PrintWhatSettings(ExportWhat.ActiveSheet, false));
            window.Close();
        }