Yes :-! :-[

Sree and Hari,
 
Shouldn't you place the escaped new line char in single quotes?
 
var newHeader = Order + '\n' + Appl;
Allen

 
Allen Manning, Technical Director
Prismix Ltd t: +44 (0)870 749 1100 f: +44 (0)870 749 1200 w: www.prismix.com
 
 
 
 
 
 
 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Doodi, Hari - BLS CTR
Sent: 16 May 2005 15:06
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Datagrid word wrap- it isnt working.

Hi Sree,

 

Thank you very much for the tip with two variables. I do remember this.

 

Thanks!
Hari

-----Original Message-----
From:
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sreejith Unnikrishnan
Sent: Monday, May 16, 2005 10:02 AM
To:
flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Datagrid word wrap- it isnt working.

 

Thanks Hari,

I tried it ... it does work when you have want to construct the string from 2 non-variables.
In your case I assume Order and Appl are not 2 variables and I wonder why you would want a variable for the header :-) ...

But, I also found that if you want to construct from 2 variables such as Order and Appl, you will have to construct it as follows:

var Order;
var Appl;

var newHeader = Order+newline+Appl;

    var newHeader = Order+\n+Appl;
or var newHeader = Order\nAppl;

does not work!

Otherwise you are bound to get an error as follows!

Operator '+' must be followed by an operand

Regards
Sree

Doodi, Hari - BLS CTR wrote:

Yes, it is working. I can see "Order" and "Appl" in two lines in my datagrid.

 

Thanks!
Hari

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Sreejith Unnikrishnan
Sent: Monday, May 16, 2005 9:42 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Datagrid word wrap- it isnt working.

 

Hari,

A bit confused ... does the variable declaration really work?

I was assuming that you have to use something like

var totalColumnName = "Total"
newLine"Reserves";

for it to render correctly. I have a feeling that the
\n would not work.
Can somebody clarify!

Nithya, and also you have to specify the height for the header!

       <mx:DataGrid width="100%" height="100%" variableRowHeight="true"
headerHeight="30">

Regards
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