Results 1 to 2 of 2

Thread: I need to retain the selection while navigating through grid pages

  1. #1

    Default I need to retain the selection while navigating through grid pages

    I have to retain the selections in the grid. While navigating through pages.

    If i select a row in page 1 of the grid. now i navigate to page 2. when i come back to page 1 , the selection should be retained.

    // cfgrid  <cfgrid format="html" name="gridWorkingBillsDetailsPaging" selectOnLoad="false" textColor="##000080" colHeaderTextColor="##000080"  colHeaderAlign="right" colHeaderFont="verdana" colHeaders="yes" colHeaderBold="yes" width="1100"                        colHeaderFontSize="12"  align="center" autowidth="true" multirowselect="true"                        selectmode="row"   pagesize="10" bind="cfc:cfc.workingbilldetails.getWorkingBillDetails({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"   >                        <cfgridcolumn name="TRANS_SEQ"             header="Transaction Id"        width="80"                  headerbold="true" />                        <cfgridcolumn name="CLIENT_TRANS_REF_ID"   header="Client Trans Ref Id"   width="100"       headerbold="true"    />                        <cfgridcolumn name="FIRST_NAME"            header="First Name"       width="80"                     headerbold="true" />                        <cfgridcolumn name="LAST_NAME"             header="Last Name"               width="80"                     headerbold="true" />                        <cfgridcolumn name="CONF_NUM"              header="Conf Num."    width="60"                    headerbold="true"  />                        <cfgridcolumn name="START_DT"             header="Start Date"   width="60"                             headerbold="true" />                        <cfgridcolumn name="END_DT"               header="End Date"       width="60"                     headerbold="true" />                        <cfgridcolumn name="PAY_AMOUNT"            header="Amount"       dataAlign="right"      width="80"                    headerbold="true"  />                        <cfgridcolumn name="CURRENCY"              header="Currency"            width="50"                    headerbold="true"  />                        <cfgridcolumn name="STATUS"              header="Status"            width="50"                    headerbold="true"  />                        <cfgridcolumn name='action'                header='Action' width="125"  headerbold="true"   />                     </cfgrid>// ajax<cfset ajaxOnLoad("fnGridPaging")>// javascript fnGridPaging=function()          { grid = ColdFusion.Grid.getGridObject("gridWorkingBillsDetailsPaging"); //overwrite existing grid footer with new div, will assign unique id to footer                           var bbar = Ext.DomHelper.overwrite(grid.bbar,{tag:'div',},true);                       //Create new PaginToolbar and render it to bbar (grid footer)                           gbbar = new Ext.PagingToolbar({renderTo:bbar,                                  store:,                                  pageSize: 10,                                  displayInfo: true,                                  displayMsg: '<b>Showing {0} - {1} out of {2} Transactions</b>',                                  emptyMsg: "<b>No Record</b>",                                 items:[                                       '-', {                                       pressed: false,                                       enableToggle:false,                              tooltip:'Click here to View All Transaction Details',                                       text: 'View All',// The text that will show for the button in the bar                                       icon:'css/add.png',//Icon graphic                                       cls: 'x-btn-text-icon',//The ext class that will display the button with text/icon properly                                       handler:showGridAll// handler:showGridAll // should be replaced with your own function                                       }                                                                                              ]                           });//Overriding the display message in the toolbar                    Ext.PagingToolbar.override                   ({                       // private    updateInfo : function(){                                var store =;            var pageData = this.getPageData();            var count, msg;             var count = store.getTotalCount()-Math.ceil(store.getTotalCount() / this.pageSize);            var fromRecord = (( ((Math.ceil((this.cursor+this.pageSize)/this.pageSize)) - 1) * this.pageSize) -(Math.ceil((this.cursor+this.pageSize)/this.pageSize))) + 2;      var toRecord=Math.min( ((Math.ceil((this.cursor+this.pageSize)/this.pageSize)) * this.pageSize)-(Math.ceil((this.cursor+this.pageSize)/this.pageSize)), count);      var pageCount=Math.ceil(store.getTotalCount() / this.pageSize);            if (this.displayItem) {            if (count === 0) {                msg = this.emptyMsg;            } else {                msg = '<b>Showing '+fromRecord+' - '+toRecord+' out of '+count+' Transactions</b>';             }            this.displayItem.update(msg);        }    }    });                 }

  2. #2
    Sencha User
    Join Date
    Feb 2013


    Are you using GXT? Sounds like a duplicate of this thread:

Similar Threads

  1. Replies: 1
    Last Post: 2 Mar 2013, 11:13 AM
  2. Replies: 2
    Last Post: 23 Mar 2011, 1:18 PM
  3. Best way to retain grid selection on store filtering
    By roytmana in forum Sencha Ext JS Q&A
    Replies: 10
    Last Post: 15 Jul 2008, 9:16 AM
  4. Replies: 1
    Last Post: 22 Feb 2008, 3:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts