View Full Version : this.proxy is undefined while using GridPanel!

9 Jun 2011, 3:57 AM
I am very new to Ext JS and would be very thankful if any of you could help me out in this-
I am getting "this.proxy is undefined" error in firebug while using GridPanel. I am showing data stored in myData in GridPanel.

var myData = {"totalCount":"7",
{"title":"XML","threadid":"12","username":"8","userid":"7","dateline":"30","postid":"65","forumtitle":"Help","forumid":"1","replycount":"0","lastpost":"170","lastposter":"cnn", "excerpt":"T"},
{"title":"send","threadid":"0","username":"_08","userid":"23","dateline":"3","postid":"53","forumtitle":"p","forumid":"30","replycount":"0","lastpost":"70","lastposter":"cay8","excerpt":"T"} ]}

var store = new Ext.data.Store ({
remoteSort : false,
autoLoad : { params:
{start:0, limit:2}
reader : new Ext.data.JsonReader({
root : 'topics',
totalProperty : 'totalCount',
idProperty : 'threadid',
fields: [
'title', 'forumtitle', 'forumid', 'author',
{name: 'replycount', type: 'int'},
{name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
'lastposter', 'excerpt'


var grid = new Ext.grid.GridPanel({
renderTo : Ext.getBody(),
width : 700,
height : 500,
frame : true,
title : 'Available Sources',
trackMouseOver : false,
autoExpandColumn : 'topic',
store : store,

columns: [new Ext.grid.RowNumberer({width: 30}),{
id : 'topic',
header : "Date",
dataIndex : 'title',
width : 420,
//renderer : renderTopic,
sortable : true
header : "Type",
dataIndex : 'replycount',
width : 70,
align : 'right',
sortable : true
id : 'last',
header : "Description",
dataIndex : 'lastpost',
width : 150,
//renderer : renderLast,
sortable : true

bbar: new Ext.PagingToolbar({
store : store,
pageSize : 2,
displayInfo : true


9 Jun 2011, 1:36 PM
I think the problem is with the autoLoad attribute. You need to remove it as it instructs the store to perform a load() operation and that will definitely throw an error since you didn't define a proxy.

You're already using loadData() and that's your "autoLoad" for static data.

9 Jun 2011, 11:39 PM
I already tried that but it didn't seem to work. Any other suggestion?

10 Jun 2011, 12:59 AM
You seem to be using paging with local data. How exactly do you expect that to work?

11 Jun 2011, 2:08 PM
I already tried that but it didn't seem to work. Any other suggestion?

It worked when I tested it locally. In addition to autoLoad, drop the paging toolbar as you're fetching off of static data.