Hi, do not use "dataField" with "labelFunction". "labelFunction" should work perfectly in your case. If this is not working use "itemRenderer".
On Tue, Dec 9, 2014 at 6:17 AM, CodeGirl [via Apache Flex Users] < [email protected]> wrote: > I have a datagrid with a datagrid column. Except the data object > contains a data object. > > For instance the object may be > > id:int > transaction:Transaction > > and Transaction > id:int > accountid:int > > Notice since the datagrid is based upon the object that the datafield is > transaction.accountid > > <mx:DataGridColumn id="accountDC" > > headerText="Vendor" > editable="true" > > dataField="transaction.accountid" > > labelFunction="lookupAccountName" > > visible="{fullDisplay}" > width="180"> > > > This becomes a problem with generic function such as Lookups and combo > boxes because item[column.dataField] does not work. ie. > object[transaction.accountid] > > protected function lookupAccountName(item:Object, > column:DataGridColumn):String > { > return accounts.lookupAccountName(item, > column.dataField); > } > > Is there a way around this so I can continue to use generic functions? > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://apache-flex-users.2333346.n4.nabble.com/Datagrid-functions-with-objects-with-objects-tp9022.html > To unsubscribe from Apache Flex Users, click here > <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==> > . > NAML > <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- *Regards,* Prashant Kumar* | *Mob.: +91 8408811225 -- View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Datagrid-functions-with-objects-with-objects-tp9022p9026.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
