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
75
UltraGridDocumentExporter - can't hide group header caption
posted

Using:Infragistics ver. 8.3.20083.2039, C#, VS 2008

Problem using UltraGridDocumentExporter

I have the following problem:

I have a grid with dynamic amount of columns.
The columns are grouped. Every group consists of three columns.
Every group has a caption and every column has a caption.

For print report I am using UltraGridDocumentExporter and it works fine (preview, PDF etc) - until the number of columns are to many and don't fit on one page (using paperorientation landscape).

Autmatic pagebreaks doesn't seem to be supported.

So I thought the use of .Hidden [e.g  band.Groups[i].Hidden = true;] for groups and columns and modifying the current section and make pagebreaks after every third group and hide the groups/columns that not should be printed on just that page would be the solution.
I also tried to hide column on "column-level" [band.Columns[i].Hidden = true;] ( That shouldn't really be necessary since  I have hidden the group).

The groups are hidden in the grid on screen,  but  on the exported printout the group header caption will not hide.
The columns are hidden, the pagebreaks [ section.AddPageBreak(); ] works fine, but the group header caption [ band.Groups[i].Header.Caption ] is still visible on the print out, and messes up the document  - while it looks good on screen.

I must be able to restore the grid as it was before printing (that works fine) so don't want to remove the groups completely.

What can I possibly do wrong?

 

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    I'm not exactly sure why that's happening. One odd thing I noticed is that you say you are hiding the group in the actual on-screen grid. That's unneccessary and probably not a good idea. You can modify the export layout without affecting the grid on the screen. And if you modify the on-screen grid's layout after the export begins, it won't have any effect on the export, since the Export layout will already be created at that point. Of course, this does not explain why it works for columns, but not bands.

    Anyway, I'm attaching a small sample test project that I used to try this out and that works fine for me. Try running it and see what kind of results you get. If this sample doesn't work for you, then something is wrong with your version of the controls. Perhaps in that case, you just need to get the latest service release.

    If my sample does work for you, then something in your real application code must be causing the issue.

    WindowsFormsApplication6.zip
Reply Children