How to take from Ext.data. SimpleStore data?

  • Hello all! Please prompt as from this.store2 to transfer data in a variable:

    var statusTD = store2.???

    Ext.exampledata.status = [
    ['hight', 'Высокий'],
    ['medium', 'Средний'],
    ['low', 'Низкий']

    ];
    var store2 = new Ext.data.SimpleStore({
    fields: ['setstat', 'namestat'],
    data : Ext.exampledata.status
    });


    var statusTD = store2.???


    Or prompt a theme where it is possible to look an example or the decision. For early thanks


  • Hi,

    you can get the data in the store for example via the "getAt()" Method of the store:



    var myRecord = store2.getAt(0); // get the first Record in the Store
    var mySetstat = myRecord.data['setstat']; //get data from the Row (in your example 'hight')

    var myNamestat = store2.getAt(1).data['namestat'] // in your example 'Средний'



    Take a look at the API Documentation for simple Store and record in Ext.data

    Greetings,
    Thorsten.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about How to take from Ext.data. SimpleStore data? , Please add it free.

    16 March 2010 | cameltoepants.com | edit