Current filter:
                                You should refresh the page.

                                How to print each Group Row starting from the a new page

                                0

                                XtraGrid provides the capability to control the process of printing Grid View via the OptionsPrint property. However, these options don't allow you to perform any complex customization. The best way to completely override the default behavior is to use the XtraReport class for printing purposes. The How to convert an XtraGrid to an XtraReport at runtime knowledge base article demonstrates how to convert the GridView to the XtraReport in code.
                                Also, some changes can be made by creating an XtraGrid descendant and overriding the basic implementation of the printing mechanism. This example demonstrates how to force the GridView to print each Group Row with all child rows on a new page.

                                You must  log in  or  register  to leave comments
                                Select file
                                • Form1.cs
                                • MyGridControl.cs
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • v2011 vol 2.11 - v2012 vol 2.8
                                using System;
                                using System.Collections.Generic;
                                using System.ComponentModel;
                                using System.Data;
                                using System.Drawing;
                                using System.Text;
                                using System.Windows.Forms;
                                
                                namespace Q205815 {
                                    public partial class Form1 : Form {
                                        public Form1() {
                                            InitializeComponent();
                                        }
                                
                                        private void Form1_Load(object sender, EventArgs e) {
                                            // TODO: This line of code loads data into the 'nwindDataSet.Categories' table. You can move, or remove it, as needed.
                                            this.categoriesTableAdapter.Fill(this.nwindDataSet.Categories);
                                            // TODO: This line of code loads data into the 'nwindDataSet.Products' table. You can move, or remove it, as needed.
                                            this.productsTableAdapter.Fill(this.nwindDataSet.Products);
                                
                                        }
                                
                                        private void OnShowPrintPreviewSimpleButtonClick(object sender, EventArgs e) {
                                            myGridControl1.ShowPrintPreview();
                                        }
                                    }
                                }