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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:38:36+00:00 2026-06-10T06:38:36+00:00

I have a grid that I’m trying to populate from an XmlStore, which is

  • 0

I have a grid that I’m trying to populate from an XmlStore, which is populated from an Xml String. So far, the store appears to be load the XML just fine, but I cannot get the grid to load the store. (i.e. grid.getStore().getCount() is always 0.

// create the Data Stores for use by the grid
Ext.define('InterfaceModel', {
    extend: 'Ext.data.Model',
    fields: [
        { name: 'id', mapping: 'id' },
        { name: 'InterfaceName', mapping: 'InterfaceName' },
        { name: 'TX_OCTETS', mapping: 'TX_OCTETS' },
        { name: 'TX_BAD_OCTETS', mapping: 'TX_BAD_OCTETS' },
        { name: 'TX_FRM', mapping: 'TX_FRM' },
        { name: 'TX_BAD_FRM', mapping: 'TX_BAD_FRM' },
        { name: 'TX_MCAST', mapping: 'TX_MCAST' },
        { name: 'TX_BCAST', mapping: 'TX_BCAST' },
        { name: 'TX_PAUSE', mapping: 'TX_PAUSE' }
    ],
    idProperty: 'id'
});

My XML is as follows:

var gridData = '<?xml version="1.0" encoding="UTF-8"?> <Interfaces> <Interface> <id>1</id> <InterfaceName>GMAC1</InterfaceName> <TX_OCTETS>123234</TX_OCTETS> <TX_BAD_OCTETS>234</TX_BAD_OCTETS> <TX_FRM>234234</TX_FRM> <TX_BAD_FRM>2341</TX_BAD_FRM> <TX_MCAST>23</TX_MCAST> <TX_BCAST>56</TX_BCAST> <TX_PAUSE>8</TX_PAUSE></Interface> <Interface> <id>2</id> <InterfaceName>GMAC2</InterfaceName> <TX_OCTETS>123234</TX_OCTETS> <TX_BAD_OCTETS>234</TX_BAD_OCTETS> <TX_FRM>234234</TX_FRM> <TX_BAD_FRM>2341</TX_BAD_FRM> <TX_MCAST>23</TX_MCAST> <TX_BCAST>56</TX_BCAST> <TX_PAUSE>8</TX_PAUSE></Interface></Interfaces>';

var gridDataXml = (new DOMParser()).parseFromString(gridData,'text/xml');

console.log ('xml', gridDataXml);  // everything looks fine

I then define my store using a memory proxy XML reader:

var eioaGridStore = new Ext.data.XmlStore({
    model: 'InterfaceModel',
    autoLoad: true,
    proxy: {
        type: 'memory',
        reader: {
            type: 'xml',
            root: 'Interfaces',
            record: 'Interface',
            idProperty: 'id'
        }
    }
});

And then load the parsed XML DOM into the store:

eioaGridStore.loadRawData(gridDataXml);

If I getCount() on the store, it properly responds with 2.

Viewing the store from the Web Inspector shows 2 arrays (that I want to be rows in my grid) (pardon the formatting)

store 
Object
data: Object
allowFunctions: false
events: Object
generation: 3
getKey: function (record) {
hasListeners: Object
items: Array[2]
0: Object
data: Object
dirty: false
events: Object
hasListeners: Object
id: "InterfaceModel-1"
internalId: "1"
modified: Object
phantom: false
raw: Element
store: Object
stores: Array[1]
__proto__: Object
1: Object
length: 2
__proto__: Array[0]
keys: Array[2]
length: 2
map: Object
sorters: Object
__proto__: Object
events: Object
eventsSuspended: 0
filters: Object
groupers: Object
hasListeners: Object
model: function i() {return this.constructor.apply(this,arguments)||null;}
modelDefaults: Object
pageSize: 25
proxy: Object
removed: Array[0]
sorters: Object
totalCount: 2
__proto__: Object

My grid component is as follows:

createGrid: function () {
    var me = this;

    return {
        id: 'eioaGrid',
        xtype: 'grid',
        border: true,
        store: this.eioaGridStore,
        columns: [{
            header: 'Interface',
            dataIndex: 'InterfaceName',
            align: 'center',
            sortable: true,
            tooltip: 'Axxia Interface'
        }, {
            text: 'OCTETS',
            sortable: false,
            width: 100,
            tooltip: 'Total number of octets in all frames.',
            columns: [{
                header: 'TX',
                width: 50,
                align: 'center',
                sortable: true,
                dataIndex: 'TX_OCTETS',
                tooltip: 'Transmitted'
            }]
        }, {
            text: 'BAD OCTETS',
            sortable: false,
            width: 100,
            tooltip: 'Total number of octets in all bad frames.',
            columns: [{
                header: 'TX',
                width: 50,
                align: 'center',
                sortable: true,
                dataIndex: 'TX_BAD_OCTETS',
                tooltip: 'Transmitted'
            }]
        }, {
            text: 'FRAMES',
            sortable: false,
            width: 100,
            tooltip: 'Total number of frames.',
            columns: [{
                header: 'TX',
                width: 50,
                align: 'center',
                sortable: true,
                dataIndex: 'TX_FRM',
                tooltip: 'Transmitted'
            }]
        }, {
            text: 'BAD FRAMES',
            sortable: false,
            width: 100,
            tooltip: 'Total number of bad frames.',
            columns: [{
                header: 'TX',
                width: 50,
                align: 'center',
                sortable: true,
                dataIndex: 'TX_BAD_FRM',
                tooltip: 'Transmitted'
            }]
        }, {
            text: 'MULTICAST',
            sortable: false,
            width: 100,
            tooltip: 'Multicast Frames: good non-pause frames with a multicast destination address which is not the broadcast address.',
            columns: [{
                header: 'TX',
                width: 50,
                align: 'center',
                sortable: true,
                dataIndex: 'TX_MCAST',
                tooltip: 'Transmitted'
            }]
        }, {
            text: 'BROADCAST',
            sortable: false,
            width: 100,
            tooltip: 'Broadcast Frames: good frames with the broadcast destination address.',
            columns: [{
                header: 'TX',
                width: 50,
                align: 'center',
                sortable: true,
                dataIndex: 'TX_BCAST',
                tooltip: 'Transmitted'
            }]
        }, {
            text: 'PAUSE',
            sortable: false,
            width: 100,
            tooltip: 'Pause Frames: pause frames internally generated by the MAC.',
            columns: [{
                header: 'TX',
                width: 50,
                align: 'center',
                sortable: true,
                dataIndex: 'TX_PAUSE',
                tooltip: 'Transmitted'
            }]
        }]
    };
}

Later, I then getCount() via the grid’s store and it comes back as empty.

console.log('grid store count', Ext.getCmp('eioaGrid').store.getCount());

Any ideas? Been stumped for a couple of days now and I’m going mad! thanks.

  • 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-06-10T06:38:38+00:00Added an answer on June 10, 2026 at 6:38 am

    I just found it… my reference to this.eioaGridStore when setting the grid store: was not in scope (was undefined)… everything now working.

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

Sidebar

Related Questions

I have a grid that is binded to a dataset that is populated from
I have a parent grid that contains multiple row definitions, all of which have
I have a grid (DevExpress XtraGrid, if that matters) which is bound to a
I have a Grid Panel that loads about 200 records from the server. I
We have a grid setup that has a column which can contain very large
In a C# WPF program I have a grid that I have successfully populated
I have a grid that fills select lists from a dataurl in the jqGrid
I have a grid that i have been trying to set up in the
I have a grid that I am extracting the values (maybe3 or so) from
I'm trying to have a grid that has items that have a custom layout/feel.

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.