0
votes

Snippet of my code pasted below :

<s:Scroller width="100%" height="100%" >

  <s:Group width="100%" height="100%" >

     <mx:DataGrid id="corrDataGrid" width="100%" height="100%" itemRenderer="

          mx.controls.Label" minColumnWidth="60" lockedColumnCount="2">

      </mx:DataGrid>

  </s:Group>

 </s:Scroller>

Both the horizontal and vertical scroll bars appear on the Datagrid if the volume of data is large . But the vertical scroll bar is only visible if we scroll the horizontal scroll bar till the end of the Datagrid . is there any way that even if the number of columns is large , the vertical scroll bar is visible and the user does not have to scroll horizontally till the rightmost side to access the vertical scroll ? Thanks.

3

3 Answers

1
votes

Just remove the Scroller and the Group. DataGrid has its own scrollbars built-in which act exactly as you would expect. There is no need to wrap it in another Scroller.

1
votes

As RIAStar pointed out, you don't need to wrap a DataGrid inside a Scroller. This is because the DataGrid's default skin already has a Scroller element that wraps a DataGroup element, which is used to actually render the data.

Now, you wanted to use a DataGroup directly, you would need to use a Scroller, just like in OP's case.

0
votes

Thanks for all the answers guys , just fixed it . I set the width of the Datagrid to the width of the Scroller .