Specifically, I need to resize a column to fit tight around the text that is 
extracted from 
the dataProvider using the labelFunction:

<mx:DataGridColumn 
  fontFamily="Courier" 
  labelFunction="get_text" 
  resizable="false"/>

And the function inside a <Script> block:

private function get_text(item:Object, column:DataGridColumn):String 
{ 
  return item.elements('text').text(); 
}

The text in all rows of this column will be the same number of characters. It 
would be 
convenient to be able to add statements to the above get_text() routine like so:

var str:String = item.elements('text').text(); 
column.width = str.length * charWidth;
return str;

But this does not work.  Any ideas?

Reply via email to