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

Printing a range of cells

How can I print a range of cells? I can not find the properties in GridPrintDocument or grid.Properties.Printxxx. Thanks.

1 Reply

AD Administrator Syncfusion Team November 28, 2002 01:15 AM

Some sample code: GridPrintDocument pd = new GridPrintDocument(grid); //Assumes the default printer if (PrinterSettings.storedPageSettings != null) { pd.DefaultPageSettings = PrinterSettings.storedPageSettings } PrintDialog dlg = new PrintDialog() ; dlg.Document = pd; dlg.AllowSelection = true; dlg.AllowSomePages = true; DialogResult result = dlg.ShowDialog(); if (result == DialogResult.OK) { pd.Print(); } Use the following code for print preview GridControlBase grid = ActiveGrid; GridPrintDocument pd = new GridPrintDocument(grid, true); //Assumes the default printer if (PrinterSettings.storedPageSettings != null) { pd.DefaultPageSettings = PrinterSettings.storedPageSettings; } PrintPreviewDialog dlg = new PrintPreviewDialog() ; dlg.Document = pd; dlg.ShowDialog(); Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon