You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2013/05/14 04:27:15 UTC

[jira] [Resolved] (FLEX-21082) DataGrid height was not calculated correctly

     [ https://issues.apache.org/jira/browse/FLEX-21082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Mclean resolved FLEX-21082.
----------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s: Apache Flex 4.10.0

Probably fixed in previous SDK version.
                
> DataGrid height was not calculated correctly
> --------------------------------------------
>
>                 Key: FLEX-21082
>                 URL: https://issues.apache.org/jira/browse/FLEX-21082
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: DataGrid
>    Affects Versions: Adobe Flex SDK 3.4 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>             Fix For: Apache Flex 4.10.0
>
>
> Steps to reproduce:
> 1. Create project and copy these code:
> <mx:DataGrid dataProvider="{totalDataGrid}" rowCount="6">
> 		<mx:columns>
> 			<mx:DataGridColumn dataField="name" headerText="Name"/>
> 			<mx:DataGridColumn dataField="split" headerText="Split"/>
> 			<mx:DataGridColumn dataField="paid" headerText="Paid"/>
> 			<mx:DataGridColumn dataField="total" headerText="Total"/>
> 		</mx:columns>
> 	</mx:DataGrid>
> 2. Provide the datagrid data.
> 3. Run the application.
>  
>  Actual Results: I expect the datagrid to be exactly 6 rows height. I don't want the scroll bar at the right. The flex SDK is supposed to calculate the necessary height and expand to 100%.
>  
>  
>  Expected Results: I see scroll bar at the right side.
>  
>  
>  Workaround (if any): 
> 1. I found if you delete the datagrid's dataprovider, and just let it to be blank. The scroll bar does not show up. If you add dataprovider back, then scroll bar shows up again. It has something to do with the font size. I tried to decrease the font size to something like <9, then scroll bar does not show, something greater than 9 will show.
> 2. If you make rowCount to 30 some kind of big number, and test 2 cases. One with no data in it, one with data in it. You could make a screenshot or something and then compare two data grid. You will notice the row height on the datagrid with data is higher. I tried even I specify the row height still not help resolve the problem. You probably need rowCount to be something like >30 to be human noticeable.
> I researched a lot into this problem. My conclusion is flex sdk does not initialize enough space for the font of datagrid, so when you have font greater than 9, it will force the datagrid to expand to fit the font. And the scroll bar will show up.
>  
> I have screenshoted a comparison of workaround 2. You could see one has scroll bar, one without. Since the rowCount is only 6. It's not that noticeable that the raw heights are different between the two. But when you make rowCount to a large number, it's very obvious.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira