Reputation: 33
I want to display the data loaded in the store object in Windows. I can see the store is loaded with the correct data. But when it is passed to the Panel and Panel is passed to the Window, when Window.Show is called, only the column names are displayed, but not the data which is stored in the Store object.
Please help me with this. The code snippet is as follows:enter code here
var store1 = new Ext.data.Store({
autoLoad:true,
fields: [{
name: 'Index'
}, {
name: 'VrfNames'
}]
});
var vrfData = [
["HI", "Hello"]
];
store1.loadData(vrfData);
console.log("Loaded " + store1.getCount() + " records");
//Could verify data is loaded properly
// creation of panel
var vrfNamesPanel = new Ext.grid.Panel({
store: store1,
columns: cm,
height: 250,
width: 700,
enableHdMenu: false,
buttons: this.buildVrfNamesPanelButtons(),
buttonAlign: 'center',
renderTo: Ext.getBody(),
//floating: true,
//closable : true//,
listeners: {
scope: this
}
});
// creation of new window
this.vrfNamesWindow = new Ext.Window({
layout: 'fit',
closeAction: 'hide',
plain: true,
title: "VRF Names ",
items: vrfNamesPanel,
enableTabScroll: true,
autoScroll: true,
width: 700
});
this.vrfNamesWindow.show();
Upvotes: 1
Views: 705
Reputation: 4196
Here is working fiddle for you.
I dont know what is your cm
columns settings so I added it, I believe that issue was there.
Upvotes: 1