Highlighted

Specify dataField value in DataGridColumn

wiser4me97

31-07-2008

can someone help me and maybe explain how to specify a
dataField value in a DataGridColumn. My dataProvider was retrieve
from a RemoteObject method which return the result of the query
(not formatted to xml).

the result data is something like this (date,title,details):

ex.

Thu Jul 31 00:00:00 GMT+0800 2008, New User!, Some user
description and details,

Thu Jul 31 00:00:00 GMT+0800 2008, New Task!, Some task
description,

Thu Jul 31 00:00:00 GMT+0800 2008, New Alerts!, Alert message





the thing is, if i just do this line it works:

<mx:DataGrid id="entries" width="100%" height="400"
dataProvider="{myRemoteObject.getWhatsNewList.lastResult}">

</mx:DataGrid>



but when i try to control the columns it displays:

<mx:DataGrid id="entries" width="100%" height="400"
dataProvider="{myRemoteObject.getWhatsNewList.lastResult}">

<mx:columns>

<mx:DataGridColumn dataField="wnDate" width="100"
headerText="Date"/>

<mx:DataGridColumn dataField="details"
headerText="details"/>

</mx:columns>

</mx:DataGrid>

Replies

Highlighted

Michael_Borbor

02-08-2008

You have to create a function so your return data could be
converted into an arraycollection or a xmllistcollection.