Tag Archives: datagrid

Adapt Flex Datagrid height to content

This is a fix for a recurring problem. When we want to make the datagrid’s height to cover its content (dataprovider). <mx:DataGrid xmlns:mx=”http://www.adobe.com/2006/mxml” variableRowHeight=”true” verticalScrollPolicy=”off” wordWrap=”true” rowCount=”{dataProvider.length}” dataChange=”resize()” columnStretch=”resize()” resize=”resize()” > <mx:Script> <![CDATA[ //This is a work around for the poorly designed wordWrap and variableRowHeight features of the DataGrid private function resize():void { if (dataProvider)… Read More »