Skip navigation
Currently Being Moderated

Datagrid scrolls unnecessarily when variableRowHeight=true

Apr 18, 2013 6:19 AM

Tags: #measure #datagrid #height #variablerowheight
I have a custom component that includes a DataGrid component.  I want to set variableRowHeight to true to avoid truncating data within a cell.  When I do, the dataGrid shows only so many rows then the user must scroll to see the rest even though there is room in the container the dataGrid could use.  It appears that the measured height of the dataGrid does not include the extra height required by the rows of variable height causing the scrollbars to appear unnecessarily.
  • I am doing this with the mxml shown below
  • I am using a custom skin to remove the column header
  • I am not using an itemRenderer and can't seem to get that to work


<s:DataGrid  id="contentDataGrid" dataProvider="{transposedDP}"

skinClass="widgets.Query.QueryDGHeaderSkin" resizableColumns="false"

variableRowHeight="true" width="100%">



<s:GridColumn dataField="Value"/>




<s:GridColumn dataField="Property"/>

  • Currently Being Moderated
    Apr 18, 2013 10:15 PM   in reply to DJens8653

    This is a common problem.  Word-wrapping text can be in any dimension so you usually need to set the width of the text widgets accurately otherwise they will report some other height.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points