1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    1
    Vote Rating
    0
    payo22 is on a distinguished road

      0  

    Default Keep rows selected in GridPanel

    Keep rows selected in GridPanel


    Hi

    I'm working with extjs 3.4, using a gridpanel with paging for show my results, each row have a checkbox for select the rows to export, but when i change of page my rows selected are lost.

    how i can keep the rows selected in each page.

    my grid is defined

    PHP Code:

    var headers=[            
    {
    header"Record"width100,renderer:renderTextodataIndex"record"menuDisabledtrue},            
    {
    header"Dir"width150,renderer:renderDomiciliodataIndex"dir"menuDisabledtrue}
    ];

    grid ext.grid.GridPanel("gridResultados",{columsHeader:headers,
                
    loadMasktrue,
                
    maskDisabledfalse,
                
    width:670,height:280,pageSize:2,showCheckBox25,tbar:['->',{                        text:"Delete...",
                
    iconCls:"x-btn-remove"
                           
    tooltip:"Delet Rows Selected",
                            
    handler:deleteRegs            },{            id:"boton",            text:"Export",            tooltip:"Export rows",            hidden:cade,            iconCls:"x-btn-export",            handler:exportReg            }]}); 
    thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,824
    Vote Rating
    836
    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


    Moved to Ext JS 3 Help forum (was in Ext JS 4 Discussion forum)
    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 User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    52
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    How are you currently checking the rows?

    Are you using the checkboxSelectionModel, or your own solution?

    If using the checkboxSelectionModel, then you could simply add some listeners to your grid's store to find out what rows (if any) are selected on beforeload, then reselect these same rows inside your load listener.

Thread Participants: 2