开发者

Flex DataBinding in Datagrid

开发者 https://www.devze.com 2023-02-17 00:41 出处:网络
I have datagrid Columns FirstName, LastName and FullName. I need to bind FirstName and Last开发者_运维百科Name column fields to give FullName ?? data provider gives onlyFirstName and LastName

I have datagrid Columns FirstName, LastName and FullName.

I need to bind FirstName and Last开发者_运维百科Name column fields to give FullName ?? data provider gives only FirstName and LastName

Help me in this!


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;
}  
0

精彩评论

暂无评论...
验证码 换一张
取 消