Hello,

I was wondering if anyone has run into this scenario and has an elegant
solution.

Symptom:

When a DataGrid comes into view that has the column set to an index
other than 0, the scrollbar is out of whack.  The only way to get it to
sync up again is via user interation. (For instance, interacting with
the scrollbar.)

Intended Functionality:

I would think that if I set the horizontalScrollPosition to something
other than 0, the scrollbar would reflect that when the DataGrid comes
into view without any user interation necessary.

Request from the group:

Does anyone know of a way to sync up the scrollbar position with the
horizontalScrollPosition?

Code is below...

Thanks,

Jun

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> "
  layout="absolute">

  <mx:DataGrid
   width="200"
   horizontalScrollPolicy="auto"
   horizontalScrollPosition="2">
   <mx:columns>
    <mx:DataGridColumn headerText="ScrollBar" width="100"/>
    <mx:DataGridColumn headerText="And" width="125"/>
    <mx:DataGridColumn headerText="Columns" width="100"/>
    <mx:DataGridColumn headerText="Out Of Sync!" width="25"/>
   </mx:columns>
  </mx:DataGrid>

</mx:Application>





Reply via email to