title: Fit Flex datagrid to data
body: <p>I have rows of text data that can vary between 0 and 100, and all need to be visible on the screen at one time.  The default behavior is fine for the grid until the rows * rowHeight > gridHeight.</p>
  
  <p>Basically I need a hook into the item height, or row height to calculate it based on the height of the grid.  I've set paddingTop and paddingBottom to zero, but there is still a considerable amount of white space in between rows.</p>
  
  <p>My datagrid component...</p>
  
  <pre><code>&lt;mx:DataGrid xmlns:mx="http://www.adobe.com/2006/mxml"
  creationComplete="OnCreationComplete()"
  paddingTop="0"
  paddingBottom="0"
  &gt;
  
  &lt;mx:Script&gt;
      &lt;![CDATA[
  
      private function OnCreationComplete():void
      {
          //setRowHeight(10);
      }
  
      override protected function setRowHeight(v:Number):void
      {
          super.setRowHeight(v);
      }
  
      ]]&gt;
  &lt;/mx:Script&gt;
  
  &lt;/mx:DataGrid&gt;
  </code></pre>
  
  <p>setRowHeight() helps, but the itemRender for the cell bigger than the cell, if I set the row height to something like 10.</p>