0

I have an AdvancedDataGrid set like this:

<mx:AdvancedDataGrid variableRowHeight="true" id="dg_groupArticolo"
                     treeColumn="{gc_idarticolo}"
                     folderClosedIcon="{null}"
                     folderOpenIcon="{null}"
                     defaultLeafIcon="{null}"
                     includeInLayout="{pm.isGridVisibleArticoli}"
                     visible="{pm.isGridVisibleArticoli}"
                     width="85%"
                     height="100%">
    <mx:dataProvider>
        <mx:HierarchicalData source="{pm.masterDataArticoli}"/>
    </mx:dataProvider>

    <mx:columns>
        <mx:AdvancedDataGridColumn id="gc_idarticolo" dataField="idArticolo" headerText="{resourceManager.getString(WOConst.BUNDLE_BACKORDER,'dg_articolo')}" width="120"/>
        <mx:AdvancedDataGridColumn dataField="descrizioneArticolo" headerText="{resourceManager.getString(WOConst.BUNDLE_BACKORDER,'dg_descrizione')}" width="200" />
        <mx:AdvancedDataGridColumn dataField="qtaDaSpedire" headerText="{resourceManager.getString(WOConst.BUNDLE_BACKORDER,'dg_qtaDaSpedire')}" width="100" />
        <mx:AdvancedDataGridColumn dataField="" />
    </mx:columns>                 

    <mx:rendererProviders>
        <mx:AdvancedDataGridRendererProvider depth="2" columnIndex="1" renderer="it.softway.wo.view.comp.BackOrderDetailGridRenderer_Ordine" columnSpan="0" />
    </mx:rendererProviders>
</mx:AdvancedDataGrid>

My problem is that the children section always takes 6 rows, excluding is subheader row, no matter how many items are actually in it: if a children section has less than 6 items, the remaining rows are empty while if it has more than 6 a vertical scrollbar is shown. Is it possible to set the grid so that the children are always shown using minimum rows needed and without vertical scrollbar?

Using Flex SDK 3.2.

Thanks, Mario

ketan
  • 19,129
  • 42
  • 60
  • 98
mabian69
  • 706
  • 6
  • 12

1 Answers1

0

Well it seems I managed to solve my issue:

I found these questions

How do I get a Flex AdvancedDatagrid to display just one row? How can I make datagrid height is equal to data content in Adobe Flex

and they put me on the right track:

I just had to put on the detail renderer declaration, which is in turn extending a grid, the assignment

rowCount="{(dataProvider.length)}"

This seems to have solved everything.

  • Mario
Community
  • 1
  • 1
mabian69
  • 706
  • 6
  • 12