1 Reply Latest reply on Jan 16, 2007 8:38 AM by ntsiii

    Scrolling datagrid only

    gvorster
      Hello, I'm new to Flex 2.

      I have this example:

      [code]
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical">
      <mx:Panel width="100%" height="100" layout="horizontal">
      <mx:Button label="Button"/>
      <mx:Button label="Button"/>
      </mx:Panel>

      <mx:HBox width="100%" height="100%">
      <mx:DataGrid height="100%">
      <mx:columns>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn width="100" headerText="Column 1" dataField="col1"/>
      </mx:columns>
      </mx:DataGrid>
      </mx:HBox>
      </mx:Application>
      [/code]


      When I scroll the datagrid horizontally, the top panel with the buttons is also scrolling in my browser.
      How should I create the layout so that only the grid is scrolling?

      Guus