1 Reply Latest reply on Aug 1, 2007 3:39 AM by aubweb

    Flex3 print an advancedDatagrid


      I'm trying to print an entire advancedDatagrid without building a PrintDataGrid in order to keep the visual aspect of the adg. (folder, icons ... )

      I have no clue how to do that.

      I already tried to add my adg to my flexprintjob but it prints me exactly what I see on my screen. Ok it's great but it's a problem when the datagrid has a scrollbar...

      Please help ...
        • 1. Re: Flex3 print an advancedDatagrid
          aubweb Level 1
          It's me again I found a solution :

          when I click on print ->

          public function doPrint():void {

          myDG.visible = false;
          myDG.styleName = 'print'; // smaller font size...
          myDG.rowHeight = 18;
          myDG.includeInLayout = false;
          myDG.height = (myDG.dataProvider.length*18) + 50;

          myPrintJob = new FlexPrintJob();

          if (myPrintJob.start()) {

          myPrintJob.addObject(myDG, 'matchWidth');


          myDG.visible = true;
          myDG.styleName = 'default';
          myDG.rowHeight = 20;
          myDG.includeInLayout = true;
          myDG.height = 300; //default heigth


          It's just what I want ...