You can add one or more record to the end of the store using Add (ext.data.record[] records) or add (Ext.data.Record record). Such as:
Copy code code as follows:
var newrecord=new personrecord ({name: "Tom", age:22});
Store.add (NewRecord);
The Add function adds new data to the end of the store, which can cause damage to its original sort, and if you want to keep it in order, you should use addsorted to invoke the same method as Add.
You can use the Insert method to insert a record into a specified location, such as:
Copy code code as follows:
var newrecord=new personrecord ({name: "Tom", age:22});
Store.insert (Store.getcount (), NewRecord);
Delete operations can use the Remove and RemoveAll functions, such as:
Copy code code as follows:
Store.remove (Store.getat (0));
Store.removeall ();
To modify the data in the store:
Copy code code as follows:
Store.getat (0). Set ("Name", "Jesse");
After you modify the internal data in the record, you can either undo all the changes by executing rejectchanges () or submit the data modification by commitchanges.