Probably you are missing something very simple ... as we always do :-)

Specify variableRowHeight = "true" in the mx:DataGrid
Then specify wordWrap in the mx:DataGridColumn.

Eg.

        <mx:DataGrid id="articlesDG" width="100%" height="100%" variableRowHeight="true">
          <mx:columns>
            <mx:Array>
              <mx:DataGridColumn columnName="SampleColumn1" headerText="
SampleColumn1" />
              <mx:DataGridColumn columnName="SampleColumn2" headerText="
SampleColumn2" wordWrap="true" />
              <mx:DataGridColumn columnName="
SampleColumn3" headerText="SampleColumn3" />
            </mx:Array>
          </mx:columns>
        </mx:DataGrid>

In the above example, only the second column will wordWrap.

Smile if it works :-)

Sree

Doodi, Hari - BLS CTR wrote:

We had the same problem but the way we did roundabout to this is - declare a var with a value with "\n" char in it and then bind this var to datagrid headertext property as shown below.. It did work for me.

 

var ordappl="Order\nAppl";

.

.

.

 

<mx:DataGridColumn headerText="{ordappl}" columnName="order" textAlign="left" />

Thanks!
Hari

-----Original Message-----
From:
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Monday, May 16, 2005 2:23 AM
To:
flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid word wrap- it isnt working.

 

Have you set variableRowHeight to true?

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of nithya karthik
Sent: Sunday, May 15, 2005 10:14 PM
To: flexcoders
Subject: [flexcoders] Datagrid word wrap- it isnt working.

 

Hai,

       when i give wordwrap="true" in a datagrid,  it isnt wraping the text... May i know the reason and the way  to rectify it?

I used something like this:

 <mx:DataGridColumn columnName="Total" headerText="Total reserves" wordWrap="true"/>

I want 'Total' in the first line and 'reserves' in the next line of the header.. How to do this?


Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

 



Yahoo! Groups Links

Reply via email to