Are you using Flex 3 beta 3? because I tried the below sample code and
I cannot reproduce it. The column widths remain the same no matter how
many times I toggle them.

--- In flexcoders@yahoogroups.com, "dfalling" <[EMAIL PROTECTED]> wrote:
>
> Yeah, I really should have done this in the first place...I'm using
> more text to explain the problem than the code takes up...
> 
> ----------
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="vertical">
>       <mx:DataGrid width="300">
>               <mx:columns>
>                       <mx:DataGridColumn id="first" headerText="first header"
> visible="{firstCheck.selected}" />
>                       <mx:DataGridColumn id="second" headerText="bravo header"
> visible="{secondCheck.selected}" />
>                       <mx:DataGridColumn id="third" headerText="charlie 
> header"
> visible="{thirdCheck.selected}" />
>                       <mx:DataGridColumn id="fourth" headerText="delta header"
> visible="{fourthCheck.selected}"/>
>               </mx:columns>
>       </mx:DataGrid>
>       <mx:HBox>
>               <mx:CheckBox selected="true" id="firstCheck"/>
>               <mx:CheckBox selected="true" id="secondCheck"/>
>               <mx:CheckBox selected="true" id="thirdCheck"/>
>               <mx:CheckBox selected="false" id="fourthCheck"/>
>       </mx:HBox>
> </mx:Application>
> 
> ----------
> 
> To test: click on the right checkbox to show that column...keep
> showing/hiding it, and note that its size shrinks each time.
> 
> 
> I've also tried, as suggested, removing the columns from the datagrid
> instead of just hiding them, but the same issue happens.
> 
> --- In flexcoders@yahoogroups.com, "Alex Harui" <aharui@> wrote:
> >
> > Post a mini-test-case.
> > 
> >  
> > 
> > ________________________________
> > 
> > From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
> > Behalf Of dfalling
> > Sent: Friday, January 11, 2008 7:09 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: DataGridColumn width shrinks when visibility
> > is toggled
> > 
> >  
> > 
> > The title sounded like exactly my problem, but the description didn't
> > match up. My issue is simply that variable width columns do not
> > resize properly when showing/hiding columns. That issue seems to deal
> > with it overriding fixed widths.
> > 
> > --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
> > , "Alex Harui" <aharui@> wrote:
> > >
> > > Is your problem related to this?
> > > http://bugs.adobe.com/jira/browse/SDK-14064
> > <http://bugs.adobe.com/jira/browse/SDK-14064> 
> > > 
> > > 
> > > 
> > > ________________________________
> > > 
> > > From: flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
> > [mailto:flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
> > ] On
> > > Behalf Of dfalling
> > > Sent: Wednesday, January 09, 2008 2:58 PM
> > > To: flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> 
> > > Subject: [flexcoders] Re: DataGridColumn width shrinks when
visibility
> > > is toggled
> > > 
> > > 
> > > 
> > > I've tried setting them all to not resize, then individually
resizing
> > > each one, but there's always a fluke with the last two columns vying
> > > for each other's space.
> > > 
> > > --- In flexcoders@yahoogroups.com
> > <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > > , "Alex Harui" <aharui@> wrote:
> > > >
> > > > There might be a workaround, I just haven't tried to figure
one out.
> > > If
> > > > you set the resizable property on every column you want to lock
> > down,
> > > > you might have success changing resizable back to true after the
> > > > updateComplete after the column is made visible again.
> > > > 
> > > > 
> > > > 
> > > > ________________________________
> > > > 
> > > > From: flexcoders@yahoogroups.com
> > <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > > [mailto:flexcoders@yahoogroups.com
> > <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > > ] On
> > > > Behalf Of dfalling
> > > > Sent: Monday, January 07, 2008 6:28 AM
> > > > To: flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com> 
> > > > Subject: [flexcoders] Re: DataGridColumn width shrinks when
> > visibility
> > > > is toggled
> > > > 
> > > > 
> > > > 
> > > > Sadly I'm kind of locked into Flex 2 for now. I was hoping
there was
> > > > a known workaround to fix this.
> > > > 
> > > > --- In flexcoders@yahoogroups.com
> > <mailto:flexcoders%40yahoogroups.com> 
> > > <mailto:flexcoders%40yahoogroups.com>
> > > <mailto:flexcoders%40yahoogroups.com>
> > > > , "Alex Harui" <aharui@> wrote:
> > > > >
> > > > > Flex 3 should be better at this than Flex 2.
> > horizontalScrollPolicy,
> > > > > resizable properties can also help.
> > > >
> > >
> >
>


Reply via email to