Hi:
Here is my code.
</mx:Panel>
<mx:DataGrid dataProvider="{totalDataGrid}" rowCount="6" textAlign="center">
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="Name" width="65" fontSize="10"/>
<mx:DataGridColumn dataField="split" headerText="Split" width="65" fontSize="10"/>
<mx:DataGridColumn dataField="paid" headerText="Paid" width="65" fontSize="10"/>
<mx:DataGridColumn dataField="total" headerText="Total" width="65" fontSize="10"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
I have a datagrid inside a panel. All the values of this datagrid is dynamically provided after this flex application initiated. The datagrid is always 6 rows, and I want the datagrid fits the panel exactly. I found this problem. Whenever there is no data in the datagrid, the panel expand exactly the size to fit this datagrid, which mean I don’t see any scroll bar in the datagrid. Whenever I trigger a event to insert data into this datagrid with 6 rows, the datagrid seems like expand a little and no longer fits in the panel. I tried all possible properties like font size, row height. I can’t fix the problem. Anyone know which property makes the datagrid expand a little?