Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8273631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:32:08+00:00 2026-06-08T07:32:08+00:00

I’m trying to create a grid that has a store with a PagingMemoryProxy in

  • 0

I’m trying to create a grid that has a store with a PagingMemoryProxy in Ext JS 4.0.7. I’d like to be able to edit the information in the store, but I’m finding that if I edit the information and go to the next page, I lose the edited information on the previous page. My code is as follows.

Ext.Loader.setConfig({
  enabled: true
});

Ext.Loader.setPath('Ext.ux', 'examples/ux');

Ext.require('Ext.ux.data.PagingMemoryProxy');

Ext.onReady(function() {
  var data = [
    {name: 'jack johnson', text: 'record1'},
    {name: 'jack johnson', text: 'record2'},
    {name: 'jack johnson', text: 'record3'},
    {name: 'jack johnson', text: 'record4'}
  ];

  var store = Ext.create('Ext.data.Store', {
    fields: ['name', 'text'],
    data: data,
    proxy: {
      type: 'pagingmemory'
    },
    pageSize: 2
  });

  var grid = Ext.create('Ext.grid.Panel', {
    store: store,
    region: 'center',
    id: 'thegrid',
    plugins: [{
      ptype: 'cellediting',
      clicksToEdit: 1,
      listeners: {
        edit: function(editor, e) {
          //e.record.commit();
        }
      }
    }],
    columns: [{
      text: 'Name',
      dataIndex: 'name',
      editor: {
        allowBlank: false
      }
    }, {
      text: 'Text',
      dataIndex: 'text'
    }],
    dockedItems: [{
      xtype: 'pagingtoolbar',
      store: store,
      dock: 'bottom',
      displayInfo: true
    }],
  });

  Ext.create('Ext.Viewport', {
    layout: 'border',
    items: [grid]
  });
});

I was wondering how I could sync up my store’s data with the proxy’s data because the store’s data actually contains the records, whereas the proxy’s data contains the record’s data, so it’s impossible to find a record by id in the proxy. I decided to the give the sync method a try.

After using the sync method, nothing seemed to happen, so I thought maybe I should commit the record… hence the commented out e.record.commit code. When that didn’t do anything, I started digging around in Firebug and eventually saw on line 44,600 in ext-all-debug the me.getNewRecords code. This eventually led me to only returning the records that weren’t commited (because it apparently checks the record’s phantom property), thus, any record I edited would not be included in the toCreate variable on line 44,600.

When I took out the e.record.commit, the toCreate variable now contained the edited records, but none of this helped solve my problem… just initial poking around and what I found.

So my question is, how does one sync a store with a PagingMemoryProxy? Is it possible? If so, what do I do?

Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:32:09+00:00Added an answer on June 8, 2026 at 7:32 am

    Solved the problem by looping through the JSON data that I eventually add to the PagingMemoryProxy… basically added an “index” value to each record in the JSON, so when I want to edit the record in the store, I can easily index into its PagingMemoryProxy by using this index value. Simple fix.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.