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 5947759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:00:36+00:00 2026-05-22T17:00:36+00:00

Could someone please explain how the insert works to add a record in a

  • 0

Could someone please explain how the insert works to add a record in a datastore
with tha fields: “title”, “info” and “price”?
because i tried some things and none of them work. and the sencha website doesnt make it very clear.

  • 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-05-22T17:00:36+00:00Added an answer on May 22, 2026 at 5:00 pm

    Adding a new item to an existing Store isn’t that hard actually.

    First of you will need to configure your model and store. In your question you name the fields ‘title, ‘info’ and ‘price’.

    Model:

    Ext.regModel('myModel', { 
        fields: [
            {name: 'id', type: 'int' },
            {name: 'title', type: 'string' },
            {name: 'info', type: 'string' },
            {name: 'price', type: 'int' }           
        ]
    });
    

    Next you configure the store that will hold the data, based on the above model. I think that, in your case, it should be a model without any data preloaded via, for example, JSON?

    So lets make a localstorage (empty store). The Store consists of the model (myModel), you give it a storeID (so that you can later on reference the store by this ID). The proxy is localstorage and the unique ID of the Store will be the ID field of the Model.

    Store:

        var myStore = new Ext.data.Store({ 
    
            model: "myModel",
            storeId: "myStoreID",
            proxy: {
                type: "localstorage",
                id: "id"            
            }
        });
    

    Now, suppose you have some kind of Form (in which the user can add input a title, info and price, and you want to add these items to the existing store on submittal.

    Within the handler of the submittal button you now have to ‘call’ the store, and perform the add function on it. Within this add function you will have to define the params (the model params) and the data to insert.

    Below I have used a mixture of fixed data and a variable to insert.

    myStoreID.add({ title: "Mijn Titel", info: "Informatie, price: prijsvar });
    

    The store will now be filled will now be filled with an extra data-record which you can use. Lets say for example that the store is attached to a dataview, then you can perform:

    dataView.update();
    

    The above isn’t a full tutorial, but I think this will help you along?

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

Sidebar

Related Questions

Could someone please explain what exactly recursion is (and how it works in Ruby,
Could someone please explain to me how the count function works with arrays like
Could someone please explain the best way to connect to an Interbase 7.1 database
Could someone please explain? I couldn't find anything on the internet, everything talks about
Could someone please explain when would I want to use delegation instead of inheritance?
Could someone please explain to me how to properly use the Anchors when creating
I wonder what a repository means in doctrine? Could someone please explain?
Could someone please help explain why I can't get this to work? I properly
Could someone who is familiar with webkit please explain or point me in the
Could someone simply explain the 3 phases in the Flash Event framework, please? By

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.