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.
Also, not sure if this issue should fall under XtraGrid or XtraPrinting.
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?
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.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.