( Emergent )How to print the specified cells

I have initialized a grid with 1000 rows and 1000 columns. But in displaying I only used 50 rows and 100 columns. And how to print these cells in the range with 50 rows and 100 columns? Thanks and expect your quick answer.

1 Reply

AD Administrator Syncfusion Team October 25, 2004 04:49 AM UTC

If you have cells selected in the grid, you can print them with code like: GridPrintDocument pd = new GridPrintDocument(this.gridControl1, true); PrintPreviewDialog dlg = new PrintPreviewDialog() ; pd.PrinterSettings.PrintRange = System.Drawing.Printing.PrintRange.Selection; dlg.Document = pd; dlg.ShowDialog(); If you need to select the cells from code, you can add code to select a Cell range like: this.gridControl1.Selections.Ranges.Add(GridRangeInfo.Cells(1,1,5,5));

Loader.
Up arrow icon