That should not break anything.  A labelFunction works at the display level
and does not affect the underlying dataProvider contents.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of sailorsea21
Sent: Thursday, March 26, 2009 11:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HOW can I convert a string into a DataGridColumn ?

 

Hi everyone, I have the folowing script that adds the % symbol:

public function dataGridPercent(item:Object, column:DataGridColumn):String
{
var str:String = item[column.dataField];
return str + "%";
}

This works fine but it breaks my "export to excel" script. I'm thinking
because the value is now a string. How can I keep the value as a
DataGridColumn but add the "%" symbol ?

The following doesn't work:

public function dataGridPercent(item:Object,
column:DataGridColumn):DataGridColumn 
{
var str:String = item[column.dataField];
return DataGridColumn(str + "");
}

Thanks.

-David



Reply via email to