flex - translate values in dataprovider for a datagrid -


i have dataprovider arraycollection of simple string values. need these strings translated before rendered in datagrid. how can this?

note not want copy new arraycollection translated values since allowing inline editing update dataprovider source.

current datagrid without translation values in dataprovider

<mx:datagrid width="100%" height="100%" id="contactinfogrid"                                  dataprovider="{model.selectedcustomer.contacts}"                                  editable="true" itemeditend="contactinfochanged(event)">                         <mx:columns>                             <mx:datagridcolumn width="200" datafield="type" editable="false"                                                headertext="{resourcemanager.getstring('customer','customer.contactinformation.type')}"/>                             <mx:datagridcolumn width="300" datafield="value" editable="true"                                                headertext="{resourcemanager.getstring('customer','customer.contactinformation.value')}"/>                             <mx:datagridcolumn editable="false" headertext="{resourcemanager.getstring('customer','general.remove')}">                                 <mx:itemrenderer>                                     <mx:component>                                         <mx:vbox horizontalalign="center">                                             <controls:removelinkbutton visible="true" label=""  click="outerdocument.removecontactinfo(event)"/>                                         </mx:vbox>                                     </mx:component>                                 </mx:itemrenderer>                             </mx:datagridcolumn>                          </mx:columns>                     </mx:datagrid> 

you either need to:

  • translate values in dataprovider itself. i'm not sure if want change source of data.
  • add label functions datagrid columns , return translated text each cell

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -