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));