You can try making copies of every DataGridColumn as once they are used some fields get set so they don't get treated the same the next time.
From: [email protected] [mailto:[email protected]] On Behalf Of Dharmendra Chauhan Sent: Wednesday, January 21, 2009 9:13 AM To: [email protected] Subject: [flexcoders] Re: DataGrid Column Sizing issue Hi Alex, Thanks for the reply. I am reseting column every time when I add remove any column from from DataGrid Column.But It still scaled last column up to right most of dataGrid. I am summing size of all column and assigning it to datagrid.width and calling datagrid.validateNow() method. still it is not resizing size of dataGrid. Any idea ,which method i need to call to ask container to resize it. Regards, Dharmendra --- In [email protected]<mailto:flexcoders%40yahoogroups.com>, Alex Harui <aha...@...> wrote: > > When horizontalScrollPolicy="off" (default), all columns are scaled to fit within the width of the DG. It makes it kind of hard to insert one column and get the sizing you want because existing columns get an extra attempt their sizes honored. One solution is to totally reset the columns array. > > If horizontalScrollPolicy="on" or "auto" columns do not get scaled but the last column will get stretched as necessary so we don't leave dead space at the far right of the scroll area. > > From: [email protected]<mailto:flexcoders%40yahoogroups.com> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On Behalf Of Dharmendra Chauhan > Sent: Tuesday, January 20, 2009 8:02 AM > To: [email protected]<mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] DataGrid Column Sizing issue > > > Hi All, > > I have designed a custom dataGrid which allows user to select > column which he wants to be visiable.Here is the issue which I have > been facing: > > When user select two column to be visiable, > > Lets assume Col1.with = 25 , > > Col2.with = 20 , > > Expected Result: > > It should occupy 25+20 pixel space and adjust > datagrid size accordingly. > > Actual Result: > > Col1 is occupying correct space but col2 occupies > all rest of the space available on the right hand side i.e. col2 is > to occupying more space than it is suppose to be. > > I want col2 to occupy only 20 pixel space. > > datagird height and width both are 100 % > > Any help would be highly appreciated. > > Regards, > > Dharmendra Chouhan >

