Still trying to figure out how to control the heights of datagrids in a
repeated custom component.

 

If I do not set the height of the datagrid then all repeated datagrids seem
to acquire a height which is the height necessary to display the largest
amount of data. Therefore I end up with some data grids that only have one
row of data with HUGE amounts of empty space in them. 

 

If I do set the height of the datagrid to 100% then each datagrid takes on a
height of 100% of the custom component height. Therefore I end up with
vertical scrollbars.

 

I basically want to have each repeated datagrid display all its rows of data
without using any vertical scrollbar.

 

Here is the relevant code of my custom component

 

Canvas xmlns:mx="http://www.adobe.com/2006/mxml"; width="600">

            <mx:DataGrid x="20" y="36"  showHeaders="false" width="525"
id="markSheetSectionDG" wordWrap="true" variableRowHeight="true"
editable="true" dataProvider="{markSheet10DGDataAC}" height="100%">

                        <mx:columns>

                                    

                                    <mx:DataGridColumn headerText=""
dataField="blockTitle" editable="false" />                                  

                    

            <mx:DataGridColumn dataField="blockMark" 

                itemRenderer="mx.controls.CheckBox" 

                rendererIsEditor="true" 

                editorDataField="selected" headerText="" editable="true"
width="50" />

             

                        </mx:columns>

            </mx:DataGrid>

            <mx:Text text="{_xmlItem.subTitle}" x="20" y="10" id="subTitle"
fontWeight="bold"/>

 

 

This problem is something that affects several areas of my application so it
would be great to find a solution.

 

Thanks

 

Paul

 

p.s the following is the code in my main mxml file that displays the
repeated custom component

 

<mx:VBox width="720" height="190" id="markSheetTile">

                                                

<mx:Repeater id="markSheet10NewRepeater"
dataProvider="{this.markSheet10XMLData}" >


<local:MarkSheet10Item  id="markSheet10NewItem"
xmlItem="{markSheet10NewRepeater.currentItem}">

</local:MarkSheet10Item>

</mx:Repeater>         

</mx:VBox>

 

 

Reply via email to