Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting data from actionscript class file into Datagrid

 
Nitin Menon
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have problem printing the values from an actionscript class. The following is my actionscript class :

package com.script.vo
{
[RemoteClass(alias="com.java.classes.vo.AdminClassVO")]
[Bindable]

public class AdminClassVO
{
public function AdminClassVO()
{
}

public var fromStation:StationVO;

public var toStation:StationVO;

public var busNumber:BusMasterVO;
}
}

The corresponding mxml code is :

<mxataGrid width="70%" height="95%" paddingLeft="40" dataProvider="{flightSectors}"
styleName="gridStyle" id="sectorsDataGrid">
<mx:columns>
<mxataGridColumn id="from" dataField="fromStation" width="150" headerText="From"/>
<mxataGridColumn id="to" dataField="toStation" width="150" headerText="To"/>
</mx:columns>
</mxataGrid>
I have written another method to fill the data into the arrayCollection variable flightSectors. The text that is displayed in the datagrid is like Object <AdminClassVO>. The actual value is not displayed.
Please help me...!
 
Narender Reddy Soma
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nitin Menon wrote:Hi,


public var fromStation:StationVO;

public var toStation:StationVO;


<mxataGridColumn id="from" dataField="fromStation" width="150" headerText="From"/>
<mxataGridColumn id="to" dataField="toStation" width="150" headerText="To"/>
</mx:columns>
</mxataGrid>



you are assigning an object to dataField property directly? I think you should try with object name like toStation.somefield ??
 
Nitin Menon
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much. I got the solution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic