Print Grid Data Content in C# Windows Forms
The Data Grid Control for Windows Forms support native print and users of the application can directly pass the content of grid to a printer. By using the Data Grid Control with friendly user dialogs, users can change the print settings, set watermark to the content of the grid and preview the print gird.
How to Print Grid Content in C# Windows Forms
The Kettic Data Grid View Control uses the PrintDocument property to print the data grid content from C# Windows Forms applications. By using the print functionality of Data Grid View Control, users can print the grid content as following:
Printing Methods of GridView Control
The Kettic Data GridView control provides 2 methods for users to add printing functionality to C# Windows Forms application, the Print() method and the PrintPreview()method. The Print() method is able to send the print task directly to the default printer. The PrintStyle property will keep the currently saved settings to print. There is an overload available in the Print() method to display a system PrintDialog which will offer the available printers and options. The following C# code snippet demonstrates how to implement this method.
The PrintPreview()method is able to open the print preview dialog and present the preview of the data grid content that will be printed. The following C# code snippet demonstrates how to implement this method.
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls