How can I scroll parentDocument canvas when I perform Drag and Drop in
DataGrid.
First MXML
There is creationComplete Script which adds Second mxml as child
<mx:Canvas id="containerWidgets" x="0" y="35" width="100%"
height="5000" backgroundAlpha="0" />
Second MXML (This MXML is used to move rows from one datagrid to another.
Basically displaying 3 column layout where objects can be drag and dopped.
When I drag top level level row to bottom I want ParentDocument canvas also
to scroll, so that user can drop rows in 10th or 20th record which cannot be
displayed on screen)
<mx:Canvas x="0" id="widgetCanvas" y="25" width="98%" height="100%"
resize="resizeGrids()">
<mx:DataGrid selectionColor="white" id="dbGrid1"
dataProvider="{grid1XMLData}" paddingTop="0" paddingBottom="0"
variableRowHeight="true" rowHeight="500" x="5" y="5" width="33%"
height="100%" showHeaders="false" dragEnabled="true" dragMoveEnabled="true"
dropEnabled="true" borderStyle="none" visible="false" rollOverColor="white"
alternatingItemColors="#FFFFFF">
<mx:columns>
<mx:DataGridColumn dataField="col51"
itemRenderer="components.ShowWidgetData" />
<mx:DataGridColumn dataField="col2" visible="false" />
<mx:DataGridColumn dataField="col3" visible="false" />
<mx:DataGridColumn dataField="col14" visible="false" />
</mx:columns>
</mx:DataGrid>
<mx:DataGrid liveScrolling="true" selectionColor="white"
id="dbGrid2" dataProvider="{grid2XMLData}" paddingTop="0" paddingBottom="0"
variableRowHeight="true" rowHeight="500" backgroundAlpha="0" x="5" y="5"
width="33%" height="100%" showHeaders="false" dragEnabled="true"
dragMoveEnabled="true" dropEnabled="true" borderStyle="none"
visible="false" rollOverColor="white" alternatingItemColors="#FFFFFF">
<mx:columns>
<mx:DataGridColumn dataField="col1" visible="false" />
<mx:DataGridColumn dataField="col51"
itemRenderer="components.ShowWidgetData"/>
<mx:DataGridColumn dataField="col3" visible="false" />
<mx:DataGridColumn dataField="col14" visible="false" />
</mx:columns>
</mx:DataGrid>
<mx:DataGrid selectionColor="white" id="dbGrid3"
dataProvider="{grid3XMLData}" paddingTop="0" paddingBottom="0"
variableRowHeight="true" rowHeight="500" backgroundAlpha="0" x="5" y="5"
width="33%" height="100%" showHeaders="false" dragEnabled="true"
dragMoveEnabled="true" dropEnabled="true" borderStyle="none"
visible="false" rollOverColor="white" alternatingItemColors="#FFFFFF">
<mx:columns>
<mx:DataGridColumn dataField="col1" visible="false" />
<mx:DataGridColumn dataField="col2" visible="false" />
<mx:DataGridColumn dataField="col51"
itemRenderer="components.ShowWidgetData" />
<mx:DataGridColumn dataField="col14" visible="false" />
</mx:columns>
</mx:DataGrid>
</mx:Canvas>
Thanx and Regards
--
Jitesh Shah, PMP