1 Reply Latest reply on Oct 27, 2009 4:41 AM by appdevs

    Scrolling two data grids together in Flex 3


      I have two data grids side by side in a Canvas.When I scroll one data grid, the other data grid should automatically move alongwith the first one.

      Can anyone let me know how that can be done?I am using the vertical scroll bar





      Code Snippet:










      label="Canvas 1" width="100%" height="100%" >

          <mx:DataGrid id="goldServerdg" height ="100%" width="297" dataProvider="{compareXML}">


                    <mx:DataGridColumn id="variable1Col" dataField="@srcVariable" headerText="Variable Name" itemRenderer="ColorCode" />

                    <mx:DataGridColumn id="value1Col" dataField="@srcValue" headerText="Value" itemRenderer="ColorCode"/>



          <mx:DataGrid id="cmpServerdg" height="100%" width="313" dataProvider="{compareXML}" >

                <mx:columns >

                     <mx:DataGridColumn id="variable2Col" dataField="@tgtVariable" headerText="Variable Name" itemRenderer="ColorCode" />

                     <mx:DataGridColumn id="value2Col" dataField="@tgtValue" headerText="Value" />