There are a number of column width bugs fixed in an updater due out soon.
-Alex ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of munene_uk Sent: Monday, March 19, 2007 8:53 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Datagrid column width bug? flex 2.0.1 in my application i can toggle a certain number of columns' visibility through this code: private function displayOptions(item:Number):void { var visible:Boolean; if(dg.columns[item].visible==true) { ! ; dg.columns[item].visible=false; } else if(dg.columns[item].visible==false) { dg.columns[item].visible=true; &nb! sp; &nbs! p; } } <mx:Canvas x="-1" y="150" width="709" height="24"> <mx:CheckBox x="0" y="0" label="First name" click="displayOptions(1)"/> <mx:CheckBox x="92" y="0" label="DOB" click="displayOptions(3)"/> <mx:CheckBox x="176" y="0" label="Address1" click="displayOptions(4)"/> <mx:CheckBox x="260" y="0" label="Address2" click="displayOptions(5)"/> <mx:CheckBox x="344" y="0" label="Address3" click="displayOptions(6)"/> <mx:CheckBox x="428" y="0" label="Postcode" click="displayOptions(7)"/> </mx:Canvas> the display options are just a bunch of checkboxes similar to this example http://ext.stuff.googlepages.com/TestTable.html <http://ext.stuff.googlepages.com/TestTable.html> now the issue is whenever i turn off a columns visibility and then turn it on again the same column's width siz! e decreases. if i repeat this several times on the same col! umn the width gradually decreases. after hours of wracking my head round i noticed that this anomally would only occur if my datagrid has a set width(mine is set as a percentage) otherwise without setting the width the toggle works fine. is this a bug or is there a way to restore the hidden column's width when shown?