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; } } <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 size decreases. if i repeat this several times on the same column 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?