1 Apr 2011 5:20 AM #1
LiveGrid Drag And Drop Scrolling
I am currently working on an issue I could use some help with. We currently have a livegrid in which we have implemented drag/drop support to reorder items in the list. The reordering seems to be working fine, however the only issue we seem to be having is that the grid will not scroll if you drag near the top or bottom of the grid. At first it wouldn't scroll at all, until I overrode the getScroller() method of the LiveGridView class to return the liveScroller rather than the GridView's scroller. Now it will scroll if you drag the item you are attempting to reorder and hover it over the up or down scroll arrow. I'm assuming I'm having the same problem with the grid using the wrong scroller but I'm not sure where to look. Any suggestions you could provide would be appreciated.
7 Apr 2011 10:51 PM #2
In the LiveGrid the scroller is a in a separate div from the "normal" grid.
You can check this in FireBug be selecting the scrollbar in the LiveGrid. Then you see thats it's a 0px wide div, with the height of the entire grid. Compare that to the normal grid where the scrollbar is a part of the div containing the rows
The scroll support fails in the LiveGrid because it tries to scroll scroller element, but since it does not have a scrollbar is can't scroll.
With your modification getting the liveScroller it works when you move the mouse over the liveScroller div, but it's not detecting when you are at the bottom/top over the div containing the rows.
You need to extend ScrollSupport to check both the normal scroller and liveScroller.
I hope this answer make sense.
By dineshv87 in forum Ext GWT: DiscussionReplies: 3Last Post: 3 Jan 2011, 11:18 PM
By kadser in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 3 May 2010, 4:36 AM
By wuschba in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 18 Jun 2009, 5:10 AM
By mherger in forum Ext 1.x: Help & DiscussionReplies: 7Last Post: 28 Aug 2007, 2:12 AM