3 Replies Latest reply on Dec 3, 2009 9:39 AM by =VA=FyreHeart

    Flex Datagrid Issue

    flexDv Level 1

      Hi

      I am using a flex datagrid component which has around 48 columns.
      There is a option for the user to select which columns he wish to see.
      Based on the user's selection the visible columns will be 1-50.
      The Datagrid is inside a Vbox container.

       

      The issue is, based on the screen resolution and the number of columns selected extra scroll bars(horizontal and vertical) appears
      for the whole Vbox in addition to the Datagrid's scrollbars.

       

      i.e if resolution is high and user selects more than 46 columns extra scroll bar appears.
      If resolution is low the extra scroll bars appears as soon as the visible columns is more than 20.

       

      Please help me if there is any resolution in preventing the extra scroll bars from appearing.Ideally, Since datagrid has its own scroll bars making more columns visible should not increase the width of datagrid.

       

      Any help will be appreciated

        • 1. Re: Flex Datagrid Issue
          =VA=FyreHeart Level 2

          Set horizontalScrollPolicy and verticalScrollPolicy to "off" in the DataGrid, VBox, or both depending on the effect you want.

           

          Ex: <mx:VBox horizontalScrollPolicy="off" verticalScrollPolicy="off"> </mx:VBox>

           

          -John

          • 2. Re: Flex Datagrid Issue
            flexDv Level 1

            I tried this for VBox, but issue is that screen is not fully visible then.

            ie after making 46 fields visible in the datagrid, the verticall scrollbar of datagrid is not visible.

            • 3. Re: Flex Datagrid Issue
              =VA=FyreHeart Level 2

              Have you hard-coded the height and width of both the VBox and the Datagrid? If you set the datagrid height and width 40 pixels or so less than the VBox it should solve that problem, I'd think.

               

              Or, you could set your DataGrid height and width to 90%.

               

              Sorry if you've already tried this. Another option is to set your datagrid's scroll policy to "off" and just leave the VBox's scroll bars available.

               

              -John