Results 1 to 2 of 2

Thread: Copy one DataStore to another

  1. #1

    Default Copy one DataStore to another

    In order to copy one dataStore to another; Being a newbie I am facing issue with exactly same code, which I got from below link.
    http://www.sencha.com/forum/showthre...Store&p=709295
    Below is my code snippet.
    Code:

    Code:
     var tempStore = new Ext.data.Store({
          recordType: oldDataStore.recordType
      });
      var records = [];
      oldDataStore.each(function(r){
       alert(r.data.salary); // First Alert
       records.push(r.copy());
      });
      
      tempStore.add(records);
      
      alert("Temp Store Count -> " + tempStore.getTotalCount()); // Second alert
    The first alert gives the value which has to be copied but the second alert gives me zero ? Wheras the origninal count is 17.
    Please advice.

    Thanks,
    UmanG

  2. #2

    Default

    Dear All,

    I even tried to use the getRange() as suggested by Condor in earlier link.

    Thanks,
    UmanG

Tags for this Thread

Posting Permissions

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