-
31 Jul 2008 12:47 PM #1
"this.proxy is undefined" while attempting to add filtering plugin to grouping grid
"this.proxy is undefined" while attempting to add filtering plugin to grouping grid
I have a system that loads javascript arrays to get data into a grouping data grid. So there is no JSON, AJAX, or PhP data srouce. I'm attempting to add the filtering plugin to the grid, however I keep getting the error..
this.proxy is undefined
file://localhost/Volumes/Fnord/ext-2.1/ext-all-debug.js
Line 10614
I'm at a bit of a loss, anyone out there able to point me in the right direction? Here is the initialization function for the grid, all of which works save the filtering. Data loads, i get the filtering menu option in the columns specified by the "filters" array. However soon as I actually try to filter data, I get the error.
Code:// Grid varriables. var flatData = []; var dataColumns = []; var dataReader = []; var srtInfo = {}; var grpField = ''; var grpText = ''; var grdTitle = ''; var extGrid; function initGrid(){ Ext.menu.RangeMenu.prototype.icons = { gt: 'img/greater_then.png', lt: 'img/less_then.png', eq: 'img/equals.png' }; Ext.grid.filter.StringFilter.prototype.icon = 'img/find.png'; Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); var filters = new Ext.grid.GridFilters({ filters:[ {type: 'string', dataIndex: 'owner'} ]}); Ext.QuickTips.init(); var xg = Ext.grid; // shared reader var reader = new Ext.data.ArrayReader({}, dataReader); var gridStore = new Ext.data.GroupingStore({ reader: reader, data: flatData, sortInfo: srtInfo, groupField:grpField }); extGrid = new xg.GridPanel({ store: gridStore, columns: dataColumns, view: new Ext.grid.GroupingView({ forceFit:true, startCollapsed:true, groupTextTpl: grpText.replace(/>/,">").replace(/</,"<") }), frame:true, width: 700, height: 450, collapsible: true, animCollapse: false, title: grdTitle, plugins: filters, iconCls: 'icon-grid', renderTo: document.body }); extGrid.on('rowdblclick', function(grid, rowIndex, e) { window.open(grid.getStore().getAt(rowIndex).get("Link"),"_blank"); }); }
-
31 Jul 2008 12:50 PM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
look at the grouping store source. I think it's a JSON based reader.

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
31 Jul 2008 1:00 PM #3
-
31 Jul 2008 1:52 PM #4
So I've done a bit more experimentation. Taking the ouput of the php file in the filtering grid example (http://extjs.com/deploy/dev/examples...rid-filter.php) and plugging in into the javascript for the example as a data property to the json store rather then having the data load from the url results in the same "this.proxy is undefined" error.
Looking deeper into the example source, it would seem to me that the filtering is actually being done on the server via the php rather then on the client via the extjs grid.
I had been assuming that client side filtering was an option, it would seem that I'm wrong unless someone can point me in the direction of an example.
-
31 Jul 2008 2:49 PM #5
Just had to figure out how to tell the filter plugin to use local data.
All better now.Code:var filters = new Ext.grid.GridFilters({ local:true, filters:[ {type: 'string', dataIndex: 'Owner'} ]});
-
31 Jul 2008 3:03 PM #6
You're probably in an excellent position to start a FAQ for that extension.
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
31 Jul 2008 5:48 PM #7
-
1 Aug 2008 3:54 AM #8
I empathize with your statement as I had that at one time too, but I still posted the example and FAQ in my signature below. It's an active board, people will help / correct you.

P.S. It's the "coming to grips" part that makes you that much more appropriate to document stuff as you have the perspective to do so. After you've learned it then it becomes more challenging to document from the noob mindset. Also take a look at this thread which got doctored up over time.MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow


Reply With Quote