1. #1
    Sencha Premium Member
    Join Date
    Jan 2011
    Location
    Pune,India
    Posts
    33
    Vote Rating
    0
    Sandeesh is on a distinguished road

      0  

    Default Issue with PagingToolBar

    Issue with PagingToolBar


    Hi,
    I have implemented a grid with pagination(Paging with local data).
    This grid also supports self drag n drop (i.e.rows can be re-ordered using drag n drop).

    This is how i have implemented it :-

    Code:
    notifyDrop : function(dd, e, data){
                                var ds = quoteLineItemGrid.store;
                                var sm = quoteLineItemGrid.getSelectionModel();                         
                                var rows = sm.getSelections();
                                
                                if(dd.getDragData(e)) {
                                    var cindex=dd.getDragData(e).rowIndex;
                                    if(typeof(cindex) != "undefined") {
                                        for(i = 0; i <  rows.length; i++) {
                                            ds.remove(ds.getById(rows[i].id));
                                        }                                   
                                        ds.insert(cindex,data.selections);   
                                        sm.clearSelections();   
                                        if(quoteLineItemGrid != null){                                         
                                             quoteLineItemGrid.reconfigure(ds,colModel); 
                                        }                                                  
                                            
                                    }
                                }                    
                            }
    This works fine.
    Now , my question is ,
    When i perform drag n drop on Page No 1, (For example I have shuffled the rows)
    and then i navigate to Page No 2.
    Now when I come back to page No 1,
    the grid rows isnt in the way I shuffled it.

    Rather its, showing me data as in its original state, when it was first rendered.

    I tried assigning new store to the pagingToolbar:-

    Code:
        var oldStore = quoteLineItemGrid.getBottomToolbar().store;
        var pgToolbar = quoteLineItemGrid.getBottomToolbar();
        pgToolbar.unbind(oldStore);
        pgToolbar.bindStore(ds);
    This isnt helping either.

    Can anyone help me.
    Thanks in advance.
    -Sandeesh
    Last edited by mitchellsimoens; 23 Feb 2012 at 6:53 AM. Reason: added [CODE] tags

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    When you page, the data in the store is removed so if you changed the index of a record it will be lost when you go back to it unless the server sends back the new index when you page to it.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2011
    Location
    Pune,India
    Posts
    33
    Vote Rating
    0
    Sandeesh is on a distinguished road

      0  

    Default


    But I am using PagingMemoryProxy (Paging with local data).
    I dont make a server call while navigating.

    How do I maintain the sequence of rows while navigating?
    Thanks

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi