• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

pagingtoolbar properties when using Ext.create

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • pagingtoolbar properties when using Ext.create

    I built a Sencha Architect app that displays customer summary Accounts Receivable data in a "Main" grid. I have built the app so when you click on the "Main" grid panel item, then I create a window that has a "detailgrid". Both grids are using the pagingtoolbar on the bottom. The issue that I am experiencing is that if I open the detail grid and use the pagingtollbar to move to a 2nd page of data on the detail grid. When I close the "detail" window grid and select a 2nd customer from the "Main" grid, then the previous pagingtool bar properties are retained from the previous window. I set the "closeaction" on the window is set to destroy. Below is the code that creates the window. Do I need to set the paging grid values when I create the window?

    Code:
    onGridpanelItemClick: function(dataview, record, item, index, e, eOpts) {
        Ext.create('ARAPP.view.Detail', {
              renderTo: Ext.getBody(),
              rec: record,
         }).show();
     }

  • #2
    Can you post up the code for the ARAPP.view.Detail component and also the store and model code used on it?

    Comment


    • #3
      I just zipped up the app (ARAPP) and sent you code in Dropbox. Let me know if you need something else?

      Thanks,

      Comment


      • #4
        I looked at the code you sent. In your Detail controller, in the onWindowShow method, look for this last line of code and change it:

        from:
        Code:
        detailStore.load();
        to:
        Code:
        detailStore.loadPage(1);
        This should force the store back to page 1 every time it's reloaded.
        Last edited by richard.milone; 03-10-2020, 04:05 PM.

        Comment


        • #5
          Good afternoon Richard,

          I tried changing the code as you specified, but it didn't work. The results were similar, but it had a side effect in that showed information from the grid below. Let me know if I should try something else?

          thanks,

          Comment


          • #6
            Can you email me a screenshot of what you're seeing after that change? Whatever you posted on the forum isn't coming through for me.

            Comment


            • #7
              Good morning Richard,

              I emailed you the screen shots.

              Comment


              • #8
                Thanks! Your solution worked! I didn't realize I had omitted the "Page" portion of the code you sent from my code in Architect.

                Code:
                detailStore.load();
                Code:
                detailStore.loadPage(1);

                Comment

                Working...
                X