HI guys, im using zend_amf and flex. My problem is i have to populate my advance datagrid using array collection. this array collection have a children.
Örnek:
[Bindable]
private var dpHierarchy:ArrayCollection = new ArrayCollection([
{trucks:"Truck", children: [
{trucks:"AMC841", total_trip:1, start_time:'3:46:40 AM'},
{trucks:"AMC841", total_trip:1, start_time:'3:46:40 AM'}])
]};
ama benim DataGridDataSource i uzak nesne benim örnekteki gibi aynı biçimi, ya da herhangi başka bir yol var dizisi toplama sonucu dönüştürmek nasıl bir veritabanından gelmelidir.
burada benim avans datagrid olduğunu
<mx:AdvancedDataGrid id="datagrid"
width="500" height="200" lockedColumnCount="1" lockedRowCount="0" horizontalScrollPolicy="on" includeIn="loggedIn" x="67" y="131">
<mx:dataProvider>
<mx:HierarchicalData id="dpHierarchytest" source="{dp}"/>
</mx:dataProvider>
<mx:groupedColumns>
<mx:AdvancedDataGridColumn dataField="trucks"
headerText="Trucks"/>
<mx:AdvancedDataGridColumn dataField="total_trip"
headerText="Total Trip"/>
<mx:AdvancedDataGridColumnGroup headerText="PRECOOLING">
<mx:AdvancedDataGridColumnGroup headerText="Before Loading">
<mx:AdvancedDataGridColumn dataField="start_time" headerText="Start Time"/>
<mx:AdvancedDataGridColumn dataField="end_time" headerText="End Time"/>
<mx:AdvancedDataGridColumn dataField="precooling_time" headerText="Precooling Time"/>
<mx:AdvancedDataGridColumn dataField="precooling_temp" headerText="Precooling Temp"/>
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumnGroup headerText="Before Dispatch">
<mx:AdvancedDataGridColumn dataField="bd_start_time" headerText="Start Time"/>
<mx:AdvancedDataGridColumn dataField="bd_end_time" headerText="End Time"/>
<mx:AdvancedDataGridColumn dataField="bd_precooling_time" headerText="Precooling Time"/>
<mx:AdvancedDataGridColumn dataField="bd_precooling_temp" headerText="Precooling Temp"/>
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumn dataField="remarks"
headerText="Remarks"/>
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumnGroup headerText="Temperature Compliance">
<mx:AdvancedDataGridColumn dataField="total_hit" headerText="Total Hit"/>
<mx:AdvancedDataGridColumn dataField="total_miss" headerText="Total Miss"/>
<mx:AdvancedDataGridColumn dataField="cold_chain_compliance" headerText="Cold Chain Compliance"/>
<mx:AdvancedDataGridColumn dataField="average_temp" headerText="Average Temp"/>
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumnGroup headerText="Productivity">
<mx:AdvancedDataGridColumn dataField="total_drop_points" headerText="Total Drop Points"/>
<mx:AdvancedDataGridColumn dataField="total_delivery_time" headerText="Total Delivery Time"/>
<mx:AdvancedDataGridColumn dataField="total_distance" headerText="Total Distance"/>
</mx:AdvancedDataGridColumnGroup>
<mx:AdvancedDataGridColumnGroup headerText="Trip Exceptions">
<mx:AdvancedDataGridColumn dataField="total_doc" headerText="Total DOC"/>
<mx:AdvancedDataGridColumn dataField="total_eng" headerText="Total ENG"/>
<mx:AdvancedDataGridColumn dataField="total_fenv" headerText="Total FENV"/>
<mx:AdvancedDataGridColumn dataField="average_speed" headerText="Average Speed"/>
</mx:AdvancedDataGridColumnGroup>
</mx:groupedColumns>
</mx:AdvancedDataGrid>
Teşekkürler, ve ben gerçekten yardıma ihtiyacım var.