This does it: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF"> <mx:Script> <![CDATA[ public function setWidth(event){ if (event.target == _level0.myGrid2){ myGrid.getColumnAt(event.columnIndex).width = myGrid2.getColumnAt(event.columnIndex).width ; } else if(event.target == _level0.myGrid){ myGrid2.getColumnAt(event.columnIndex).width = myGrid.getColumnAt(event.columnIndex).width ; } } ]]> </mx:Script> <mx:DataGrid width="100%" id="myGrid" alternatingRowColors="[#CCCCCC,#FFFFFF]" columnStretch="setWidth (event);" marginBottom="0"> <mx:columns> <mx:Array> <mx:DataGridColumn headerText="Key" cellRenderer="MyTotal"/> <mx:DataGridColumn headerText="Value"/> <mx:DataGridColumn headerText="Test"/> <mx:DataGridColumn headerText="Test2"/> </mx:Array> </mx:columns> </mx:DataGrid> <mx:DataGrid rowHeight="30" width="100%" borderThickness="0" vGridLineColor="#FFFFFF" hGridLineColor="#FFFFFF" id="myGrid2" columnStretch="setWidth(event);" headerHeight="0" rowCount="1"> <mx:columns> <mx:Array> <mx:DataGridColumn /> <mx:DataGridColumn /> <mx:DataGridColumn cellRenderer="MyTotal"/> <mx:DataGridColumn /> </mx:Array> </mx:columns> </mx:DataGrid> </mx:Application>
--- In flexcoders@yahoogroups.com, "Joe" <[EMAIL PROTECTED]> wrote: > I have a datagrid on top of another datagrid. The bottom grid is for > totals of the top grid. When I resize the a column in the top grid I > want the bottom grid to adopt the new column width. Is this possible to > do? I know I can call a function using columnStretch. So I guess I > would need to know the correct actionscript syntax. Thanks ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/