I am continuing on with the printing of all the UltraGrids on a UltraTabStripControl, a question I asked about earlier today. Another issue I am running into is that the grids are only filling up about 1/2 the page. I tried setting the page margins on the sections but that does not seem to work.
The UltraGrid is only showing one group across multiple rows, this thread I gave a screen shot. If I have the terminology correct, I am using RowLayouts. On the screen the Question column is set to be the longest, with the Response being the last column and much shorter. In the PDF, this was reversed, the Question column is short and the Response column is long.
* Is there any way to control the width of the grid?
* Is there any way to influence the width of individual columns?
Sam
Hi Sam,
I'm afraid I'm not sure what you are describing here. What are you exporting the grid to - a pdf document? are you exporting multiple grids?
Are you talking about half the page vertically or horizontally?
Let me try again from the top:
I am working on printing my data out to a printer in a report type of fashion, so I am using the PDF features to do this.
This “report” is made up of the data from this screen shot:
I circled in Blue the tabs. I am using the UltraTabStripControl to implement these tabs. Each tab currently represents a “section” on the “report”. In each “section” there is a collection of info that is currently being displayed to the user via an UltraGrid control. I have circled this UltraGrid control in Purple.
Each row of data on the UltraGrid is being displayed via the RowLayouts method. As you can see from the screen shot, the second row has two different columns, a Question and a Response. The Question is much longer then the Response.
In the form that contains the UltraTabStrip and the UltraGrid, I am greating the report like this:
Attached is the result. I notice two things I don’t like:
* The tables/girds in the PDF do *NOT* fill the width of the page
* The width of the Question column is always very much narrower then the width of the Response column.
Is it possible for me to do something that will change either of the things I don’t like?
P.S. Would be nice if there was some way to add code and make it look nice without doing a screen shot.
P.S.S. Just learned that your system does not accept PDF files, don't know if this is an oversite or by design. If an over site, would be nice if I did not have to compress it first :) If by design, I understand. Just an FYI :)
scarleton said:* The tables/girds in the PDF do *NOT* fill the width of the page
Okay... I see what you mean here. The way this works is that the exporter adjusts the size of the page to the size of the grid, not the other way around. Since this grid fits on a single page, nothing is changed.
What you could do is try to determine the width of a printed page and then make the grid width the same before you export. Getting this info from the printer is the tricky part, since it depends on the DPI, the page settings, etc. Unfortunately, I don't know any way to do it easily.
scarleton said:* The width of the Question column is always very much narrower then the width of the Response column.
I'm not sure what's going on there. The UltraGridDocumentExporter has a property called AutoSize, and by default, it sizing all of the columns so that the text is fully visible. In your case, though, the text is actually getting cut off. This might be a bug, or perhaps you are turning off the AutoSize? Or, it's possible that the grid is intentionally not autosizing the width of the column because the column is set to use Multiline. In the latter case, you would need to turn off the AutoSize on the DocumentExporter and then use the PerformAutoSize or other methods on the columns to size them how you want them. You would do this in the BeginExport event and use the Layout passed into the event so it does not affect the on-screen grid.
scarleton said:P.S. Would be nice if there was some way to add code and make it look nice without doing a screen shot.
It's not on the toolbar, but you can use "code" and "/code" tags (surrounded by square brackets) to format code in your posts.
scarleton said:P.S.S. Just learned that your system does not accept PDF files, don't know if this is an oversite or by design. If an over site, would be nice if I did not have to compress it first :) If by design, I understand. Just an FYI :)
I imagine this is done for security reasons.