2 Replies Latest reply on Nov 25, 2006 10:10 PM by pixelflip

    wordWrap property on an item in a datagridcolumn

    pixelflip
      Hi,

      I coded it this way:

      <mx:DataGridColumn wordWrap="true" width="200" headerText="Comments" dataField="comments">

      The text value doesn't wrap around though. It gets clipped.

      What am i missing?

      Thanks in advanced.

        • 1. Re: wordWrap property on an item in a datagridcolumn
          peterent Level 2
          Try changing the rowHeight of the DataGrid so there is more vertical space. Make it at least 42.
          • 2. Re: wordWrap property on an item in a datagridcolumn
            pixelflip Level 1
            Hi Peter,

            Thanks for the quick response. I poked around a little bit more in the online help and stumbled into the 'itemrenderer' property of the datagridcolumn component ... tried it out and managed to get the result that I was looking for. Here's how I coded it:

            <mx:DataGridColumn width="320" headerText="Comments" dataField="comments">
            <mx:itemRenderer>
            <mx:Component>
            <mx:Text text="{data.comments}" selectable="false"/>
            </mx:Component>
            </mx:itemRenderer>
            </mx:DataGridColumn>

            Again, thanks for taking the time looking into it.

            I'm having a great time learning Flex! The sample apps are such great starters!

            later,
            pixelflip