The object returned provides a set properties allowing you to customize the View's print and export options. General Information WinForms Controls. XtraWizard ASP. View this topic on docs. Grid Namespace BaseView. Print BaseView. Export Printing Overview Export Overview. Copyright c Developer Express Inc. All rights reserved. General Information.
WinForms Controls. NET Core Support. What's Installed. Build an Application. Controls and Libraries. Common Features. Get More Help. CellMergeEventArgs Class. CellMergeEventHandler Delegate. DetailExpandButtonMode Enumeration. DrawFocusRectStyle Enumeration. EditFormBindingMode Enumeration. EditFormModifiedAction Enumeration. EditFormResult Enumeration. EditFormUserControl Class.
FilterItem Class. FilterPopupEventArgs Class. GridEditingMode Enumeration. GridFindPanelLocation Enumeration. GridMenuEventArgs Class. GridMenuEventHandler Delegate. GridMenuType Enumeration.
GridMultiSelectMode Enumeration. GridOptionsBehavior Class. GridOptionsClipboard Class.
How to: Use Custom Printing Templates
GridOptionsCustomization Class.The following example demonstrates how to print a Grid Control or show its Print Preview. To do this, you should use either the GridControl. Print or GridControl. ShowPrintPreview methods. To verify that printing the Grid is possible, use the GridControl. IsPrintingAvailable property. When printing a Grid, the current print settings will be used to represent a Grid. Note that you can access and change these settings via the GridView.
OptionsPrintBandedGridView. OptionsPrint or CardView. OptionsPrint properties. General Information WinForms Controls. View this topic on docs. Copyright c Developer Express Inc. All rights reserved. General Information. WinForms Controls. NET Core Support. What's Installed. Build an Application. Controls and Libraries. Forms and User Controls. Messages, Notifications, and Dialogs.C# DevExpress Add New Row To GridView Part 2
Editors and Simple Controls. Ribbon, Bars and Menu.
How to: Print a Grid and Show its Print Preview
Application UI Manager. Docking Library.Before printing, page settings for each worksheet can be customized. The more general printing parameters can be set up via the ribbon items contained in the Page Layout tab.
All available page settings are grouped together in the Page Setup dialog. A click on the Print button within the Page Setup dialog or ribbon File tab invokes a browser-specific print dialog. Print dialog options might vary based upon the web client browser used. Get started today and download your day trial of ASP. NET Controls and Libraries includes 30 days of free technical support.
NET distribution. Refer to the Demos and Sample Applications topic to learn more. DevExpress ASP. NET Subscriptions and are backed by a 60 day unconditional money-back guarantee. To learn more and obtain pricing information, visit the Compare Features and Pricing webpage. For immediate assistance, contact us by Email at info devexpress.
No results found for. All Demos. Application Scenarios. Version: v vol 2. Change Theme Settings. Themes Loading…. Show All Themes. Margins Orientation Size. Page Setup. Convert to Range. Header Row. Total Row. Banded Columns. First Column.This example demonstrates how to create and display a Print Preview for the System. DataGrid control, via the DataGridLink. General Information WinForms Controls.
View this topic on docs. How to: Print a TreeView Control. Copyright c Developer Express Inc. All rights reserved. General Information. WinForms Controls. NET Core Support. What's Installed. Build an Application.
Controls and Libraries. Forms and User Controls. Messages, Notifications, and Dialogs. Editors and Simple Controls. Ribbon, Bars and Menu.
Application UI Manager. Docking Library. Data Grid. Vertical Grid.This example demonstrates how to use grid's printing templates to change the grid printing appearance.
All docs. General Information. NET Subscription Overview. Common Tools Project Converter. Assembly Deployment Tool. Localization Service. Quality Assurance and Productivity. CodeRush Classic. TestCafe Studio.
Controls WinForms. UWP Windows Tools WinForms Skin Editor. WPF Theme Designer. Coded UI Test Extension. Frameworks and Libraries. XPO Profiler. Core Libraries. Controls and Extensions ASP. NET Core Controls.
NET Bootstrap Controls. DevExtreme ASP. Blazor Components. Tools ASP. NET Theme Builder. NET Theme Deployer. Maintenance Mode ASP.The report generation feature provides an advanced way to print and export your WinForms Grid Control data. You can easily generate a report from the grid data either at design time or at runtime, taking into account the grid layout. During report generation, it is possible to specify print appearance settings and control which grid elements are added to the report.
You can then modify the generated report as required, delegate report customization to an end-user, send the report to a printer or export it to various formats, and allow the end-user to do this manually. To generate a report based on GridControl 's data at design time, do the following. Locate the ReportGenerator component in the Toolbox and drag-and-drop it onto the application form.
On the first page of the invoked Report Wizardselect the GridControl's View for which the report is to be generated and click Next.
In the Styles wizard page, choose whether dedicated print styles or default styles should be used when generating a report. The preview shows how these options change the report's appearance. In the next page, specify the title for the generated report and click Finish to complete the wizard. The generated report is automatically added to the current project under the specified name and opened in the advanced Report Designerwhich is fully integrated into the Visual Studio IDE.
The report's declaration can be found in the file with the same name as the report name. The report designer provides rich creating, editing and publishing capabilities including the following.
See the Visual Studio Report Designer document for more information about report design-time customization. After the report is generated and customized, you can show the report's Print Preview to your end-users. It is possible to delegate report customization to end-users.
They can use the End-User Report Designer to manually modify the report, show a Print Preview, export the report, etc. For more information, refer to the Report Designer document. The following code creates a new instance of the generated report class and opens it in the End-User Report Designer.
At runtime, a report can be generated using the static ReportGenerator. GenerateReport method of the ReportGenerator class. When generating a report in code, you can also take into account dedicated report generation options those that are available in the Report Generation Wizard. To do this, create a ReportGenerationOptions class instance, set its appropriate properties and pass it as the last parameter to the GenerateReport method.
To take advantage of binding expressionsuse the ReportGenerator. GenerateReport method with the useExpressionBindings Boolean parameter set to true. Binding expressions provide advanced capabilities for further customization of the generated report. See Data Binding Modes to learn more. General Information WinForms Controls. View this topic on docs. The report generation engine takes into account the following grid features and settings.The Grid Control provides methods for printing displayed data, showing a preview window and invoking a print dialog.
This topic demonstrates how to customize the printed version of the Grid Control, and lists ways with which the grid control can be printed. This topic consists of the following subsections. Custom painting, alpha blending and color gradient features are not supported in the grid control's printout. To apply the changes made, call the BaseView. Although the Grid Control provides direct methods for printing displayed data, these methods delegate the printing functionality to the DevExpress Printing Library.
If this library cannot be found, the printing and export functionality is not available. IsPrintingAvailable property's value. These methods print and show a print preview of the data displayed by the Grid Control's Default View the GridControl.
MainView or the currently maximized detail View. Refer to the XtraPrinting Library documentation for more information on the functionality provided by the print preview window. PrintInitialize event. By default, a printed grid utilizes the same appearances as when it is displayed onscreen these appearance settings can be customized for each View using the BaseView. Appearance property. However, each View provides print appearances used to paint the View's visual elements buttons, headers, cells, etc.
To use print appearances instead of display appearances when the grid is printed, set the View's OptionsPrint. UsePrintStyles option to true. Use the View's BaseView. AppearancePrint object to adjust print appearances.
How to: Customize Print Settings When Printing GridControl
This object provides multiple properties with which you can specify the appearance settings for various View elements for Grid Views - data and group rows, even and odd data rows, filter panel, footer panel, etc.
The code below shows how to enable print appearances and customize the background color of even rows. Each View provides a set of options that specify the View elements to be printed, as well as the appearance settings to be used to paint these elements when the grid control is printed.
These options can be accessed as follows.