Default IR is good until you have a text longer than a datagrid.height, it won't show the scrollbars. It is easy to replicate - just supply 1000 lines of text per row and you won't see the bottom. And the worst part of it - user will never know that there is some hidden below the bottom line.
If you use TextArea as IR, it will show the scrollbars, but the whole datagrid is getting nuts while rendering. It means that it will render the rows way after the datagrid on first create. If you update datagrid, it will place IRs correctly. I tried to fix it by overriding, but the standard IR is using mx_internal in many places. If you'll have a chance to look at it as well it would be great. Thanks! Cheers, Dmitri. --- In [email protected], Alex Harui <aha...@...> wrote: > > Why didn't default renderer do what you want? > > > On 5/5/10 12:58 PM, "mitchgrrt" <mitch_g...@...> wrote: > > > > > > > I'm trying to use a TextArea as an ItemRenderer for a DataGridColumn. I > want the rows to be high enough to hold the text, however many lines > there are. It's not working. Can somebody offer some advice? Thanks. > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute"> > <mx:Script> > <![CDATA[ > [Bindable] private var _selectedData:Object = { > formFactor: "x<br>y<br>z" > }; > ]]> > </mx:Script> > > <mx:DataGrid dataProvider="{_selectedData}" rowCount="1" > variableRowHeight="true" verticalScrollPolicy="off" > verticalAlign="middle"> > <mx:columns> > <mx:DataGridColumn headerText="Form Factor" wordWrap="true" > > > <mx:itemRenderer> > <mx:Component> > <mx:TextArea htmlText="{data.formFactor}" > verticalScrollPolicy="off" wordWrap="true" /> > </mx:Component> > </mx:itemRenderer> > </mx:DataGridColumn> > </mx:columns> > </mx:DataGrid> > > </mx:Application> > > > > > > > -- > Alex Harui > Flex SDK Team > Adobe System, Inc. > http://blogs.adobe.com/aharui >

