0 Replies Latest reply on Nov 5, 2009 5:53 AM by uri*1

    AdvancedDataGrid header text is cut

    uri*1

      Hi

      I am using AdvancedDataGrid for displaying some data.

      When the header font size has the default size, the header is wrapped ok into two rows when there is no enough space.

      But whenever the header font size are set to a larger  size, the header is cut. code example and screen shot are bellow.

      It looks like the calculations are based on small font size, because the header height is being enlarged, but not enough.

      The header font size is set by the user and must be full presented.

      Do you have any idea?

       

      Thanks

       

      <?xml version="1.0"?>

      <mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml" initialize="onInit()">

      <mx:Style>

           

       

      </mx:Style>

        <mx:Script>

            <![CDATA[

             importmx.collections.ArrayCollection;

                       

             [Bindable]

             private vardpFlat:ArrayCollection = newArrayCollection([

          {Region:"Southwest", Territory:"Arizona",

           Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000},

          {Region:"Southwest", Territory:"Arizona",

           Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000}, 

          {Region:"Southwest", Territory:"Central California",

           Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000}, 

          {Region:"Southwest", Territory:"Nevada",

           Territory_Rep:"Bethany Pittman", Actual:52888, Estimate:45000}, 

          {Region:"Southwest", Territory:"Northern California",

          Territory_Rep:"Lauren Ipsum", Actual:38805, Estimate:40000},

          {Region:"Southwest", Territory:"Northern California",

           Territory_Rep:"T.R. Smith", Actual:55498, Estimate:40000}, 

          {Region:"Southwest", Territory:"Southern California",

           Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000},

          {Region:"Southwest", Territory:"Southern California",

           Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000}

                  ]);

                 

      private functiononInit():void

      {

            varheaderStyleCSS:CSSStyleDeclaration = newCSSStyleDeclaration(".myDataGridHeaderStyle");

            headerStyleCSS.setStyle("color","#000000");

            headerStyleCSS.setStyle("fontSize",14);                     headerStyleCSS.setStyle("fontFamily","Verdana");

            headerStyleCSS.setStyle("textAlign","left");

            headerStyleCSS.setStyle("fontWeight","bold");                     headerStyleCSS.setStyle("fontStyle","normal");                    headerStyleCSS.setStyle("textDecoration","none");

            headerStyleCSS.setStyle("paddingLeft","2");

            myADG.setStyle("headerStyleName", "myDataGridHeaderStyle");

                             

                  }

                 

              ]]>

          </mx:Script>

       

      <mx:Panel title="AdvancedDataGrid Control Example"

            height="75%" width="75%" layout="horizontal"

      paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">

       

           <mx:AdvancedDataGrid id="myADG"

                  width="100%" height="100%" selectionMode="singleCell"

                  left="0" right="0" bottom="0"

                  minHeight="0"

                  wordWrap="true"

                  variableRowHeight="true"

                  textAlign="left"

                  resizableColumns="true"

                  paddingLeft="0"

                  paddingRight="0"

                  paddingTop="0"

                  paddingBottom="0"

                  sortableColumns="true"

                  sortExpertMode="true"

                  borderStyle="none"     

                  headerWordWrap="true"                                

                  initialize="gc.refresh();">

            

                  <mx:dataProvider>

                      <mx:GroupingCollection id="gc" source="{dpFlat}">

                          <mx:grouping>

                              <mx:Grouping>

                                  <mx:GroupingField name="Region"/>

                                  <mx:GroupingField name="Territory"/>

                              </mx:Grouping>

                          </mx:grouping>

                      </mx:GroupingCollection>

                  </mx:dataProvider>       

                 

                  <mx:columns>

               <mx:AdvancedDataGridColumndataField="Region dddddddddd www"/>

                      <mx:AdvancedDataGridColumndataField="Territory ffff hhhhh"/>

                      <mx:AdvancedDataGridColumndataField="Territory_Rep"

                          headerText="Territory Rep"/>

                      <mx:AdvancedDataGridColumndataField="Actual"/>

                      <mx:AdvancedDataGridColumndataField="Estimate"/>

                  </mx:columns>

             </mx:AdvancedDataGrid>

          </mx:Panel>

         

      </mx:Application>

       

       

      header font size ex.JPG