1 Reply Latest reply on Nov 26, 2009 3:26 PM by Gregory Lafrance

    PrintDataGrid disappears when in a VBox

    Gregory Lafrance Level 6

      I have a PrintDataGrid in a TitleWindow, and the PrintDataGrid displays fine if it is a direct child of the TitleWindow, but if it is in a VBox, it does not display.

       

      So this works (PrintDataGrid displays):

       

       

            <mx:PrintDataGrid id="pdg" dataProvider="{printDataGridAC}" width="100%" height="100%"
            showHeaders="false">
            <mx:columns>
              <mx:DataGridColumn dataField="merchantName"/>
              <mx:DataGridColumn dataField="merchantAddress"/>
              <mx:DataGridColumn dataField="merchantOffer"/>
            </mx:columns>
          </mx:PrintDataGrid>    
        
      

       

      But this does not work (only the header and footer images display):

       

        <mx:VBox id="printVB">
          <mx:Image source="{pageHeader}"/>
          <mx:PrintDataGrid id="pdg" dataProvider="{printDataGridAC}" width="100%" height="100%"
            showHeaders="false">
            <mx:columns>
              <mx:DataGridColumn dataField="merchantName"/>
              <mx:DataGridColumn dataField="merchantAddress"/>
              <mx:DataGridColumn dataField="merchantOffer"/>
            </mx:columns>
          </mx:PrintDataGrid>   
          <mx:Image source="{pageFooter}"/>
        </mx:VBox>

        • 1. Re: PrintDataGrid disappears when in a VBox
          Gregory Lafrance Level 6

          More info on this. If I take the header and footer images and the PrintDataGrid out of the VBox, and make them direct children of the TitleWindow, the PrintDataGrid displays correctly in the TitleWindow, but then how do I get the header and footer images to be printed as well?

           

          Its strange that having the PrintDataGrid in a VBox prevents the PrintDataGrid dataProvider from being filled.