A popular and simple solution for this is to create a secondary datagrid whose dataProvider is a aggregate collection of the master datagrid data.
But we need to handle certain properties for footer datagrid to achieve this. some of them are :
1) on stretch of the master datagrid columns, we need to change the column width of the footer datagrid also.
eg: we can write a columnStretchHandler and assign this method to the "columnStretch" property of the master datagrid as follows:
private function columnStretchHandler(event:AdvancedDataGridEvent):void {
var dg:AdvancedDataGrid = event.target as AdvancedDataGrid;
<footer_datagrid_id>.columns[event.columnIndex].width =
dg.columns[event.columnIndex].width;
}
2) Other properties that may have to be set are :
rowCount="1"
showHeaders="false"
maxHeight="30"
sortExpertMode="true"
sortableColumns="false"
No comments:
Post a Comment