Can you explain a bit more about what you need? Thanks
Iain --- In [email protected], [EMAIL PROTECTED] wrote: > Thank you, that's perfect. Would you be able to tell me the correct syntax > to get compute the colums in the datagrid? thanks > > > > > CONFIDENTIALITY STATEMENT - This message and any files or text attached to > it are intended only for the recipients named above, and contain > information that may be confidential or privileged. If you are not an > intended recipient, you must not read, copy, use, or disclose this > communication. Please also notify the sender by replying to this message, > and then delete all copies of it from your system. Thank you. > > > > "digital_eyezed" <[EMAIL PROTECTED]> > Sent by: [email protected] > 09/12/2005 03:26 PM > Please respond to > [email protected] > > > To > [email protected] > cc > > Subject > [flexcoders] Re: Datagrid columns resize > > > > > > > Sorry, remove the cellrenderer: > > <?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" /> > <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 /> > <mx:DataGridColumn /> > </mx:Array> > </mx:columns> > </mx:DataGrid> > </mx:Application> > > --- In [email protected], "digital_eyezed" > <[EMAIL PROTECTED]> wrote: > > 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 [email protected], "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 > > > > > > > -- > 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 ------------------------ 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/

