Current filter:
                                You should refresh the page.
                                Support Center
                                  • Hello.

                                    When I print a grid using the default options, the column headers don't display so nicely (see attachment). I've tried setting the grid columns to WordWrap just before printing, but it seems to have no effect on the issue.

                                    Any suggestions?

                                    Also, not sure if this issue should fall under XtraGrid or XtraPrinting.


                                column headers.png

                                Hi Josh,

                                You can use the GridView.ColumnPanelRowHeight property to set the required Column height, to achieve your goal.
                                To obtain more information regarding this method, please review the "XtraGrid GridView.ColumnPanelRowHeight Property" article in the help.
                                Please feel free to contact us if you need any additional assistance in this regard. We will be happy to help you.



                                Changing the ColumnPanelRowHeight appears to have no effect. This is the code I wrote that executes when the Print menu item is selected:

                                 bbiPrint.ItemClick += delegate
                                                    int currentHeight = ((GridView) grid.MainView).ColumnPanelRowHeight;
                                                    ((GridView) grid.MainView).ColumnPanelRowHeight = -1; // auto-calculate
                                                    ((GridView) grid.MainView).ColumnPanelRowHeight = currentHeight;

                                When it's executed, I get the same result as before (in the previously attached picture).

                                Any other ideas?



                                Hi Josh,

                                When the ColumnPanelRowHeight property value is -1, the column header row height is calculated based upon the column header content. The height is calculated to fit the header image with a single text line (according to its current style). So, you should manually define the ColumnPanelRowHeight to fit your content.
                                Please feel free to contact us if you need any additional assistance. We will be happy to help you.


                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners