0
votes

I have datagrid Columns FirstName, LastName and FullName.

I need to bind FirstName and LastName column fields to give FullName ?? data provider gives only FirstName and LastName

Help me in this!

1

1 Answers

2
votes

Use a labelFunction in your FullName column :

<mx:DataGridColumn headerText="FullName" labelFunction="getFullName"/>  

private function getFullName(item:Object, col:DataGridColumn):String 
{  
    return item.FirstName + ' ' + item.LastName;
}