The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
ADAdministrator 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