Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I got this error in my Ext JS application.
this error occurs because of the store not bind properly to grid in ext js.

how can I solve it?

Below is my code for store, view, controller and model

controller-
viewList: function () {

        var me = this;
        Ext.Ajax.request({
            url: 'WebService.asmx/getAllUser',
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },          
            scope: this,
            success: function (response) {
                var mydata = Ext.decode(response.responseText);
                var store = Ext.getStore('UserInfo');
                store.loadRawData(mydata);
                console.log(store);
            }
        });

        var form = new vDemo.view.userList({});

        this.tabPanel = new Ext.Panel({
            renderTo: 'conent',
            scope: this,
            layout: 'card',
            border: false,
            items: [this.form]

        });

    }


View is-
Ext.define('vDemo.view.userList', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.userlist',
    title: 'All Users',

    // we no longer define the Users store in the `initComponent` method
    store: 'UsersInfo',
    collapsible: true,
    autoLoad: true,
   
    initComponent: function () {
    console.log("ok");


        this.columns = [
            { header: 'Name', dataIndex: 'firstName', flex: 1 },
            { header: 'Email', dataIndex: 'lastName', flex: 1 },
            { header: 'Email', dataIndex: 'email', flex: 1 }
        ];

        //Ext.apply(this, Ext.apply(this.initialConfig, config));
        this.callParent(arguments);
    }
});

And Model is-
Ext.define('vDemo.model.userm', {
    extend: 'Ext.data.Model',
    fields: ['userAutoId', 'firstName', 'lastName', 'email', 'DOB', 'userid', 'password', 'gender', 'bloodGroup', 'hieght', 'isDeleted']
});


I getting this error
Uncaught TypeError: Cannot read property 'buffered' of undefined


What I have tried:

I am trying to get store's data into grid view. I got the error as above.
Posted
Updated 7-Aug-22 20:09pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900