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
404
Exporting only Band[0] rows to document
posted

I have an Ultrawebgrid that dispaly a parent/child hierarchy (on a web screen the user can drill into the parent row to see the details of the child rows).    The user will have the option to export the grid to a report using the UltrawebgridDocument Exporter.  The problem is that on export I only want the Parent (Band[0]) rows, but I am getting the Band[0[ rows expanded showing the child detail.  Is there a way to just export the Band[0] "collapsed" and not showing the child details.

 

Thanks

 

Neil 

  • 404
    Verified Answer
    posted

    After poking around a little more found at least one answer, to hide the individual cells of the child row (funny hiding the child band did not work).  Provide the code below in an effort to help anyone else with a similar question

     

     

     

     

    protected

     

    void DocumentExport_BeginExport(object sender, Infragistics.WebUI.UltraWebGrid.DocumentExport.DocumentExportEventArgs e)

    {

     

    if (e.Layout.Bands.Count > 1)

    {

     

    for (int i = 0; i <= e.Layout.Bands[1].Columns.Count - 1; i++)

    {

    e.Layout.Bands[1].Columns[i].Hidden =

    true;

    }

    }

     

    }