Skip to main content
BennyB23
Participant
September 23, 2010
Question

Binding DataGrid Scrollbar Events

  • September 23, 2010
  • 1 reply
  • 583 views

I just re-posted my initial inquiry, regarding the context for the result I'm going for. In the meantime, I have a question based on a potential work-around:

How would I go about creating a two-way binding for scrollbar mouse events between two DataGrids with the same dataprovider? Programmatically loosely speaking, they would be arranged as follows:

<mx:DataGrid

     id="datagrid1"

     dataProvider="{vidItems}"

     left="0" top="0" width="300" rowCount="5" (etc...)

</mx:DataGrid>

<mx:DataGrid

     id="datagrid2"

     dataProvider="{vidItems}"

     left="25" top="0" width="275" rowCount="5" (etc...)

</mx:DataGrid>

In this scenario, the additional rows would activate the scrollbar for each DataGrid and, by default would be aligned row-for-row at the same index at creation. For "datagrid1" the MouseWheel events for the Scrollbar executed over the visible area of the DataGrid would need to be passed to "datagrid2" to keep the rows for both components in synch, while the MouseWheel, thumb drag, increment click, and decrement clicks from "datagrid2" would need to be passed to "datagrid1".

Any suggestions would be greatly appreciated.

Thanks~Benny

This topic has been closed for replies.

1 reply

BennyB23
BennyB23Author
Participant
September 24, 2010

I came up with an alternate solution that's a much more straightforward and logical way of achieving the desired effect. I posted it here: http://forums.adobe.com/message/3160303#3160303

It's not an answer to the question, but I'm no longer looking for one, so...