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
125
DocumentExporter Hierarchical grid Data
posted

I have tried to export the contents of a grid containing hierarchical data into a pdf file using the DocumentExporter. The result looks very nice and is formatted so that it fits the page of the pdf document. However, all the rows of the data within the grid are displayed (including those which need to be drilled down to be seen) even if they are not visible in the grid. I used the PrintDocment control to print the contents of the grid and here the output matched the grid display and only showed data that was visible in the grid but the columns require reformatting to ensure they fit on the page.

Is it possible to combine the benefits of both these methods so that I can get an output that is nicely formatted and only displays the rows that are visible (i,.e drillled down) in the grid? 

Many thanks for any help received

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Try this:


            private void ultraGridDocumentExporter1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.DocumentExport.DocumentExportInitializeRowEventArgs e)
            {
                if (e.Row.Expanded == false)
                    e.SkipDescendants = true;
            }

Children