Hello Alban,
I had a similar requirement and ended up catching the columnStretch  
event of the data grid and laying out inputs (labels for me) on a  
canvas in the handler for columnStretch.  I would hope there's a  
better way though.  It' a shame just binding to the column widths  
doesn't work.  You may want to catch updateComplete too if anything  
else can cause your columns to change width.

<mx:DataGrid id="dgAllData"
        columnStretch="arrangeTotals(dgAllData)"
        updateComplete="arrangeTotals(dgAllData)">

...snip...
</mx:DataGrid>

and then something along the lines of
private function arrangeTotals(grid:DataGrid):void {
        var cumulativeWidth:Number = 0;
        for each (var col:DataGridColumn in grid.columns) {
                // logic to layout your controls
                cumulativeWidth += col.width;
        }
}

This worked for me, though I admit it's not a very elegant solution.
Stephen

On 11 Sep 2007, at 09:06, Alban Soupper wrote:

>
> Sorry, the mail has been sent before I can complete it L
>
>
>
> …
>
> <mx:HBox width="{dg.width}">
>
> <mx:TextInput id="filter1" … width="{column1.width}"/>
>
>             …
>
> </mx:HBox>
>
> …
>
> <mx:DataGrid id="dg">
>
>             <mx:columns>
>
>                                     <mx:DataGridColumn id="column1"  
> headerText="c1"/>
>
>                                     …
>
>             </mx:columns>
>
> </mx:DataGrid>
>
>
>
>
>
>
>
> This doesn’t work!
>
> The text inputs have not the good size and they don’t resize  
> themselves when the columns are resized.



--
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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> 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/
 

Reply via email to