Printing Row Ranges in Virtual Grid

How can I print a range of rows, without doing the QueryRowHeight = 0?

1 Reply

AD Administrator Syncfusion Team June 19, 2006 03:16 PM UTC

Hi Joe, This is achieved by setting the PrintRange enumeration of the PrinterSettings to Selection. To print the range of rows in a grid , you need to add the selection range.(using this.grid.Model.Selection.Add method). Here is a code snippet. this.grid.Model.Selections.Clear(); this.grid.Model.Selections.Add(GridRangeInfo.Rows(1,3)); GridPrintDocument pd = new GridPrintDocument(this.gridDataBoundGrid1, true); PrintPreviewDialog dlg = new PrintPreviewDialog(); pd.PrinterSettings.PrintRange = System.Drawing.Printing.PrintRange.Selection; dlg.Document = pd; dlg.ShowDialog(); this.grid.Model.Selections.Clear(); Please refer to the KB Article for more details. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=64 Let me know if this helps. Best Regards, Haneef

Loader.
Up arrow icon