Hi,
It seems that the UltraGrid has problems keeping the display and print out consistant with the layout done in the UltraGrid Designer:
Problems On the PDF export:1. The group by row on the original grid is missing2. The columns are not resized correctly to fit in the page horizontally - it just cramped to the left side of the page. (used SizeColumnsAndRowsToContent option)
Problems on screen display:1. The column layout has been changed unexpectly - column 9 and 10 got moved to the right of column 12. The header was resized even though Runtime Label Sizing was set to false.
So my questions are:1. How to make sure the PDF export contains the group by row?2. How to resize the grid in PDF export to extend and fit horizontally on the page?3. Why does the layout changed when displaying the grid (while exporting as PDF the column position is fine) ?4. How to prevent the grid column header from resizing (e.g. only resize the actual content cell) ?
By the way, the layout was done standard view (not card view) with label position on the left, and "Keep Headers with Cells" option checked. Does anyone else experiencing the same problem? Thanks for your help!
Hi Chris,
I'm having a hard time following what you are describing.
1) What GroupByRow are you referring to? I don't see any grouping in the screen shots you have here.
2) The way exporting to PDF works is that the columns are sized to their content and the report pages are sized to fit the width of the grid. There is currently no option to size the grid to fit the page, but you could probably acheive what you want by simply setting the widths of the columns manually and turning off the AutoSize on the DocumentExporter. You would have to determine the size of the page, of course, and the convert that from points to Pixels - the DocumentExporter assembly exposes methods that do this, I think.
3) I don't understand your question. You are saying that exporting the grid to PDF is changing the layout of the on-screen grid? I don't see how this could happen unless something in your code is doing it. If it's happening and it's not your code, then it's obviously a bug.
4) I don't understand the question. The column header has to be the same width as the column. You can't size one without the other.
What version of the components are you using? I recommend getting the latest hot fix before you do anything else, as their may be fixes which correct some of the issues you are having.
Mike,
Thanks for the fast response:
1. The group by row I refer to is the rows on the Display Result screen capture where it said "Friday January 22, 2007 - 1 Record". This row is missing from the PDF export.
2. Is there anyway to set the width of the grid instead of setting each column's width individually? Or is there a way to simply let the system autosize the cell and column based on the content and header text? Currently the cells with long text content will become wrapped in two lines and the child band does not resize at all - all cells & columns become about 10 pixels wide each.
3. Now that you mentioned the code changes, I checked back and realized that the original column 9 and 10 from the dataset was hidden and replaced with two unbinded column that has a calculated value based on column 9 and 10. I added the two unbind column in the code. Is there any way to make the added column shows up in the same position and span exactly like the hidden column that it was supposed to replace?
4. When I designed the layout in the UltraGrid designer, I can place the column label on the left of the cell (see screen shot), and the label's size is not the same as the cell. You can see that in the "Display Result" screen capture where column 5, 7, 9, 10 and 11's header width is smaller than the corresponding cell on its right. I would like to size the column header (or "label" so it was called in the grid designer) and make it smaller.
I've used the latest 8.1.20081.2033 hot fix on the project. Thanks!