DreamingWell Logo

Horizontal Scrolling in DataGrids with many Columns

Posted by Travis Collins at May 1, 2008 12:51 PM

Out of the box, horizontal scrolling in datagrids with many columns is not smooth; especially if your view has many visible rows. A cheap and easy way around this is to disable "liveScrolling". Without liveScrolling, the datagrid will not redraw until mouseUp from the scroll.

To improve on that, I wanted to have vertical liveScrolling and horizontal non-liveScrolling. The solution is simply to use the following function as an event handler for the "scroll" event on the dataGrid.

private function dataGridScroll(event:ScrollEvent):void { exhaustGrid.liveScrolling = (event.direction == "vertical"); }

The downside is that the first vertical scroll after a horizontal scroll will not be a live scroll. I am sure there is an easy way around that.

 

Post a comment




Remember Me?


Flickr Feed

IMG_0037.JPGIMG_0036.JPGIMG_0035.JPGIMG_0034.JPGIMG_0032.JPG

Twitter Status

Travis is gearing up for a DreamingWell product announcement that's been in the works for 6 months. :)

Last Seen in

Addison Heights, Virginia

 

Privacy Policy

|

Copyright DreamingWell.com 2008