Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Mar 2009
    Location
    Denver, CO
    Posts
    38
    Vote Rating
    0
    mabco is on a distinguished road

      0  

    Default Grid sorting and horizontal scrolling

    Grid sorting and horizontal scrolling


    I have a basic, store-backed Grid, with a horizontal scroll bar (large number of columns). When the grid is sorted while scrolled to the right, the grid/store gets reloaded, resulting in the grid being scrolled all the way back to the left (non-scrolled) position. However, the vertical scroll position does not change. It appears this is standard behavior as the Grid Plugins examples (http://extjs.com/examples/grid/plugins.html) has an example with horizontal scrolling and it exhibits the identical behavior.

    So, what's the fix? Is this a bug or a flaw in the implementation? Either way, is it going to be fixed? Users of this API should not have to be worrying about basic functionality like this. I can't imagine any user of my application thinking that this behavior would be beneficial. If they sort on a column in a grid, they are sorting on it because they want to look at that column sorted.

    It appears this may be yet another hoop I have to jump through to implement functionality that should be handled in the API. I've already tried catching the SortChange event, but that doesn't help me as the grid/store reload has already happened by that time the grid is already scrolled to the left. I've tried catching the BodyScroll event, but that seems to do me no good either.

    Sorry about the rants, but my patience is wearing thin with this API. We're currently in evaluation phase with this API and this could be the final straw. There's no way our users would accept this defect (and it is a defect). If the support team can tell me that a fix for this will be in a future release, or someone can give me a simple, interim solution for this problem, we may be able to convince our management to continue forward with GXT.

  2. #2
    Sencha User
    Join Date
    Mar 2009
    Location
    Denver, CO
    Posts
    38
    Vote Rating
    0
    mabco is on a distinguished road

      0  

    Default


    Anyone? I could use some help over here.

  3. #3
    Ext GWT Premium Member
    Join Date
    Jul 2008
    Posts
    33
    Vote Rating
    0
    Adam Ward is on a distinguished road

      0  

    Default


    Has anybody working on GXT actually looked at this bug? This is a pretty important UI consideration that we would like to see get fixed if at all possible.

  4. #4
    Ext GWT Premium Member les's Avatar
    Join Date
    Sep 2008
    Posts
    48
    Vote Rating
    0
    les is on a distinguished road

      0  

    Default


    +1

    This would nice to fix, otherwise apps we build look and feel like they are broke.

  5. #5
    Sencha User
    Join Date
    Jan 2012
    Location
    Romania
    Posts
    4
    Vote Rating
    0
    carbotox is on a distinguished road

      0  

    Default


    You can take the scroll state and restore it after sort is done.

    getting scrollState before sort:
    Code:
    getStore().addListener(Store.BeforeSort,
                    new Listener<StoreEvent<HMapModel>>() {
    
                        @Override
                        public void handleEvent(StoreEvent<HMapModel> be) {
                            if (isRendered()) {
                                scrollState = getView().getScrollState();
                            }
                        }
                    });
    Apply scrollState aftre sort is done:

    Code:
     addListener(Events.SortChange, new Listener<GridEvent<ModelData>>() {
    
                @Override
                public void handleEvent(GridEvent<ModelData> be) {
                    restoreScrollerState();
                }
            });
    Code:
     private void restoreScrollerState() {
            if (scrollState != null) {
                El scroller = getView().getScroller();
                if (scrollState.y < scroller.getWidth()) {
                    scroller.setScrollLeft(scrollState.x);
                }
                if (scrollState.x < scroller.getHeight()) {
                    scroller.setScrollTop(scrollState.y);
                }
            }
        }

Thread Participants: 3