1 Reply Latest reply on Oct 9, 2008 11:28 AM by m_hartnett

    DataGridColumn width not working...

    ericbelair Level 1
      I'm trying everything to get my DataGrid to display how I want it - with an explicit width - but it's not cooperating. It seems to set it's own width.

      The only workaround I've found is to add a Container above the DataGrid with a Label inside of it (????):

      <mx:Box width="100%">
      <mx:Label text="" />

      Why this works, I have no idea....

      Please help...
        • 1. Re: DataGridColumn width not working...
          m_hartnett Level 3

          Change your
          creationComplete="dataGrid_creationCompleteHandler(); to
          initialize="dataGrid_creationCompleteHandler(); or whatever you want to call the method.

          At the point of creationComplete your datagrid has already drawn itself. During the initialize the properties are set for each column to use before it draws itself.

          I have never manipulated grid columns widths programatically after it has drawn itself so I am not sure how to do this. (I would think it would be possible). You could also define the width within each datagridcolumn.