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.
Unfortunately, activation email could not send to your email. Please try again.

Printing Row Ranges in Virtual Grid

Thread ID:





45325 Jun 16,2006 04:52 PM Jun 19,2006 11:16 AM Windows Forms 1
Tags: GridControl
Jose Lacson
Asked On June 16, 2006 04:52 PM

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

Administrator [Syncfusion]
Replied On June 19, 2006 11:16 AM

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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.