Just uses 0 instead of 2.

regards.

On 11/30/06, coderjun <[EMAIL PROTECTED]> wrote:

  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";
 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>








--
----------------------------
Igor Costa
www.igorcosta.com

Reply via email to