--- In [email protected], Guy Morton <[EMAIL PROTECTED]> wrote:
> Does anyone here have a different solution that they would recommend  
> for some reason?
> 
> Given that no-one has suggested an alternative, I think the answer 
to  
> that might be "No".


It is possible of having a datagrid for the footer information under 
the one of the data table. 

It's simpler to handle but the behavior is not as smooth as in Alex's 
demo. The columns of the footer DG get aligned only after you have 
dropped the column bar into its new position. 


<mx:Script>
<![CDATA[
        private function onColumnStretch(event:DataGridEvent):void
        {
                
DataGridColumn(summaryDG.columns[event.columnIndex]).width = 
DataGridColumn(dataDG.columns[event.columnIndex]).width;
        }

        // You may also need to run this on container resize
        public function alignColumns():void
        {
                for(var i:uint = 0; i < dataDG.columns.length; i++)
                {
                        DataGridColumn(summaryDG.columns[i]).width = 
ataGridColumn(dataDG.columns[i]).width;
                }
        }
]]>
</mx:Script>


<mx:DataGrid
        id="dataDG" 
        columnStretch="onColumnStretch(event)"
        width="100%" height="100%"
        verticalScrollPolicy="on"
        columns="{dgColumns}"
        dataProvider="{dgProvider}"
/>

<mx:DataGrid
        id="summaryDG"
        showHeaders="false"
        width="100%" height="25"
        columns="{sumColumns}"
        dataProvider="{sumProvider}"
/>  






Reply via email to