Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1425
Exporting WinGrid to Report - Sizing and Formatting Issues
posted

Hi, I've searched around and couldn't find a solution to my problem, but excuse me if it already exists...

We are required to generate a report document from an UltraWinGrid. We are using the UltraGridDocumentExporter to export to a section of an Infragistics report, before publishing it to a PDF.

Here's a shot of the grid (please excuse the jazzy colours...):

and here's the grid exported to the report:

As indicated in the second shot, there are three issues we have yet to resolve, and are unsure as to whether they ARE resolvable:

  1. The column header of the first column would ideally begin in alignment with the rows - instead it starts with the GroupBy rows.
  2. The GroupBy row always extends the Column Header Row. At the maximum, this should be the same length as the Column Header Row.
  3. Ideally, the last column should be extended to the rest of the document (only in the report).

We've tried many methods to solve these including the use of the AutoFit property for the grid for issue 3.

Any help would be greatly appreciated as to if these are possible, and if so, how.

Cheers,

Richard

Parents
  • 467430
    Verified Answer
    Offline posted

    Hi Richard,

    RichardNandR said:
    • The column header of the first column would ideally begin in alignment with the rows - instead it starts with the GroupBy rows.

    I think this might be done intentionally. It makes sense for the column header to be indented in the grid, because there's a button there. But the button is not there in the PDF document, so it doesn't make sense to just leave an empty space.

    RichardNandR said:
    • The GroupBy row always extends the Column Header Row. At the maximum, this should be the same length as the Column Header Row.

    I'm not sure I understand what you mean here. The GroupbyRow extends the entire width of the grid. It has no connection to the Column Headers.

    It's doing the same thing here, it's just that your grid is smaller than the page.

    RichardNandR said:
    Ideally, the last column should be extended to the rest of the document (only in the report).

    A PDF document cannot span across pages horizontally. So the way it works is that the exporter sets the PageSize on the section to the size of the grid - if the grid is bigger than a page. Or does nothing if the grid is smaller than a page.

    I don't think there is any way to automatically make the grid fill the page. But you could probably implement this yourself by handling the BeginExport event of the UltraGridDocumentExporter. You would have to determine the width of the page, of course and then figure out how big to make the last column in the grid. It would be tricky, but it should be possible.

    You should probably Submit a feature request to Infragistics and perhaps in the future, this functionality can be added.

Reply Children
No Data