Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: [SOLVED] Copy, clone or duplicate a JsonStore

  1. #11

    Default

    Even though this thread is solved. Being a newbie I am facing issue with exactly same code.

    Below is the snippet.

    Code:
     
      var tempStore = new Ext.data.Store({
          recordType: oldDataStore.recordType
      });
      var records = [];
      oldDataStore.each(function(r){
       alert(r.data.salary);
       records.push(r.copy());
      });
      
      tempStore.add(records);
      
      alert("Temp Store Count -> " + tempStore.getTotalCount());


    The alert gives me zero ? Wheras the origninal count is 17.
    Please help.
    Last edited by umangsamani; 6 Jan 2012 at 9:25 AM. Reason: proper formatting done

  2. #12

    Default

    Try using tempStore.getCount();

Page 2 of 2 FirstFirst 12

Posting Permissions

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