When using Ivanblanc's 4.0 port, I get "b is undefined" error
Ivanblanc, thank you very much for posting a version of the search plugin for 4.0.
When I view my grid, the search box is visible. However, when I enter a search term and hit enter, nothing happens.
I looked at Firebug and discovered that there was an error saying b is undefined. It involves the Extjs-all.js file, line 7, which is here: (function(){var e=this,a=Object.protot...ate("Ext.XTemplate",j,g)}return j}});
I have selected the "local" option in my searching.js file, just to keep things simple for now.
the only other strange thing I've noticed is that searching.js file has a line reading "this.grid = this.view.up('gridpanel');". If I change the gridpanel to fit my grid name, it also creates an error saying that it is undefined.
Any ideas from anyone?
Here is an except from my code:
Code:
Ext.define('User', { extend: 'Ext.data.Model', fields: ['recordnumber', 'itemprice']});
Ext.define('UsersGrid', {
extend: 'Ext.grid.Panel', initComponent: function() {
var userStore = Ext.create('Ext.data.Store', {
autoLoad: true, model: 'User',
proxy: {
type: 'ajax',
api: {
read: 'extjs/database.php?task=LISTING',
},
reader: { type: 'json', root: 'results', },
},
});
Ext.apply(this, { viewConfig:{ forceFit: false, stripeRows: true, trackOver: true },
store: userStore,
features: [searching],
columns: [{ text: 'Record', width: 45, sortable: true, hideable: true, dataIndex: 'recordnumber' },
{ text: 'Item Price', renderer: 'usMoney', width: 55, sortable: true, hideable: true,
dataIndex: 'itemprice'}],
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: userStore,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No topics to display",
}),
});
UsersGrid.superclass.initComponent.apply(this,arguments);
}
});
Ext.onReady(function() {
var grid1 = Ext.create('UsersGrid', { renderTo: 'place-for-grid', height: 300, width: 600, title: 'Database' });
Search feature for Grid Panel
Can you please tell from the scratch, how to use this Grid Search Plugin using Asp.Net MVC.
i was able to load gridpanel successfully with paging and sorting features..but i need search feature also in my gridpanel.
i have googled a lot for solution. but i got nothing...can you please help me out ...
Quote:
Originally Posted by
jsakalos
Hi all,
the self-contained Grid Search Plugin usage example follows. This example is configured to use local filtering (mode:'local') but remote mode, when serching itself is done by the server, is also possible. The plugin should also work with AutoGrid(s) and paging grids.
Enjoy.
http://gridsearch.extjs.eu