1. #41
    Ext User
    Join Date
    Sep 2008
    Location
    Munich
    Posts
    16
    Vote Rating
    1
    roemisch is on a distinguished road

      0  

    Question Checkbox to deactivate filter again is not accessible

    Checkbox to deactivate filter again is not accessible


    When I set a filter in a column, I can not remove the filter again, because I can not click on the checkbox to deactivate the filter again.
    Is this probably a CSS problem ? Does anyone else know that issue ?
    ( I am using Ext 3.0 - and I downloaded the resources from the demo page - as the 3.0 version is not available for "normal" users).
    (You can see it in action with the demo account on www.ev-manager.com - soon there will also be a www.extrails.com page for the ERP System build with Ruby on Rails and Ext-JS)

    And by the way: A really great plugin that is a big step forward towards a simple reporting on tables !
    Last edited by roemisch; 5 Nov 2009 at 4:13 AM. Reason: Amendment

  2. #42
    Sencha User hexawing's Avatar
    Join Date
    Nov 2009
    Posts
    73
    Vote Rating
    0
    hexawing is on a distinguished road

      0  

    Default


    I almost have the same question with Mr. roemisch...
    The checkbox can't be clicked. With FireBug, it reports:"c.itemId is undefined".
    All other filters can be uncheck by empty their options, except "boolean"--it is a radio box...
    I am using Ruby on Rails, too...
    Last edited by hexawing; 11 Nov 2009 at 7:34 PM. Reason: err..I made a stupid mistake...this isnt a problem at all...

  3. #43
    Ext User
    Join Date
    Aug 2009
    Posts
    8
    Vote Rating
    0
    mrinaljena is on a distinguished road

      0  

    Question Answer

    Answer


    Hey,did anybody got above post answer?

  4. #44
    Sencha User
    Join Date
    Apr 2008
    Location
    France
    Posts
    72
    Vote Rating
    0
    eyetv is on a distinguished road

      0  

    Default


    I try to replace GridFilters v2.xx with GridFilters v3.xx but my code don't work with the new version

    Code:
    store = new Ext.data.ArrayStore({
    	fields:[
    		{name:'id' ,type:'int'},
    		{name:'type_document'},
    		{name:'code_org'},
    		{name:'num_compte'},
    		{name:'nom_cotisant'},
    		{name:'siret'},{name:'portefeuille'},
    		{name:'date_creation' ,type:'date', dateFormat: 'd-m-Y'},
    		{name:'code_ano'},
    		{name:'periode'},
    		{name:'etat'},
    		{name:'agent'},
    		{name:'date_traitement' ,type:'date', dateFormat: 'd-m-Y'},
    		{name:'commentaire'}
    	],
    	stateful : false,
    	pruneModifiedRecords:'true'
    });
    
    
    
    var filters = new Ext.ux.grid.GridFilters({ 
    	filters:[
    		{type: 'string', dataIndex: 'type_document'},
    		{type: 'string', dataIndex: 'code_org'},
    		{type: 'string', dataIndex: 'num_compte'},
    		{type: 'string', dataIndex: 'nom_cotisant'},
    		{type: 'string', dataIndex: 'siret'},
    		{type: 'string', dataIndex: 'portefeuille'},
    		{type: 'date', dataIndex: 'date_creation'},
    		{type: 'string', dataIndex: 'code_ano'},
    		{type: 'string', dataIndex: 'periode'},
    		{type: 'string', dataIndex: 'etat'},
    		{type: 'string', dataIndex: 'agent'},
    		{type: 'date', dataIndex: 'date_traitement'},
    		{type: 'string', dataIndex: 'commentaire'} 
    	],
    	local : true
    });
    	
    	
    
    var grid = new Ext.grid.GridPanel({
    	id: 'tableau',autoScroll:true,
    	store: store,
    	autoExpandColumn:'commentaire',
    	stripeRows: false,
    	height:200,plugins: filters,
    	view: new Ext.ux.grid.BufferView({scrollDelay: false}),
    	title:''
    });"
    
    
    
    var colModel = new Ext.grid.ColumnModel([
    	new Ext.grid.RowNumberer({width: 33}),
    	{id:'type_document', header:'Type de document', width: 60,hidden :false, sortable:true, dataIndex: 'type_document'},
    	{id:'code_org', header:'code organisume', width: 50,hidden :false, sortable:true, dataIndex: 'code_org'},
    	{id:'num_compte', header:'N° de compte', width: 120,hidden :false, sortable:true, dataIndex: 'num_compte'},
    	{id:'nom_cotisant', header:'Identité du cotisant', width: 180,hidden :false, sortable:true, dataIndex: 'nom_cotisant'},
    	{id:'siret', header:'Siret', width: 110,hidden :false, sortable:true, dataIndex: 'siret'},
    	{id:'portefeuille', header:'Portefeuille', width: 60,hidden :false, sortable:true, dataIndex: 'portefeuille'},
    	{id:'date_creation', header:'Date de création', width: 90,hidden :false,renderer: Ext.util.Format.dateRenderer('d-m-Y'), sortable:true, dataIndex: 'date_creation'},
    	{id:'code_ano', header:'Anomalie(s)', width: 120,hidden :false, sortable:true, dataIndex: 'code_ano'},
    	{id:'periode', header:'Période', width: 60,hidden :false, sortable:true, dataIndex: 'periode'},
    	{id:'etat', header:'Etat', width: 70,hidden :false, sortable:true, dataIndex: 'etat'},
    	{id:'agent', header:'Gestionnaire de compte', width: 90,hidden :false, sortable:true, dataIndex: 'agent'},
    	{id:'date_traitement', header:'Date de traitement', width: 80,hidden :false,renderer: Ext.util.Format.dateRenderer('d-m-Y'), sortable:true, dataIndex: 'date_traitement'},
    	{id:'commentaire', header:'Commentaire', width: 0,hidden :false, sortable:true, dataIndex: 'commentaire'}
    ]);
    
    
    
    
    grid.reconfigure(store,colModel); 
    Ext.getCmp("onglet_resultat_recherche").add(grid);
    ongletsGrillesReponses.doLayout();
    I have a error with "grid.reconfigure(store,colModel); "
    In FireFox : ext-all-debug.js(line 63350) the grid is undefined

  5. #45
    Ext User
    Join Date
    Sep 2008
    Location
    Munich
    Posts
    16
    Vote Rating
    1
    roemisch is on a distinguished road

      0  

    Default


    For me it finally worked with this code for GridFilters.js:

    Code:
    /*! * Ext JS Library 3.0+ * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ Ext.namespace('Ext.ux.grid');
    /** * @class Ext.ux.grid.GridFilters * @extends Ext.util.Observable * <p>GridFilter is a plugin (<code>ptype='gridfilters'</code>) for grids that * allow for a slightly more robust representation of filtering than what is * provided by the default store.</p> * <p>Filtering is adjusted by the user using the grid's column header menu * (this menu can be disabled through configuration). Through this menu users * can configure, enable, and disable filters for each column.</p> * <p><b><u>Features:</u></b></p> * <div class="mdetail-params"><ul> * <li><b>Filtering implementations</b> : * <div class="sub-desc"> * Default filtering for Strings, Numeric Ranges, Date Ranges, Lists (which can * be backed by a Ext.data.Store), and Boolean. Additional custom filter types * and menus are easily created by extending Ext.ux.grid.filter.Filter. * </div></li> * <li><b>Graphical indicators</b> : * <div class="sub-desc"> * Columns that are filtered have {@link #filterCls a configurable css class} * applied to the column headers. * </div></li> * <li><b>Paging</b> : * <div class="sub-desc"> * If specified as a plugin to the grid's configured PagingToolbar, the current page * will be reset to page 1 whenever you update the filters. * </div></li> * <li><b>Automatic Reconfiguration</b> : * <div class="sub-desc"> * Filters automatically reconfigure when the grid 'reconfigure' event fires. * </div></li> * <li><b>Stateful</b> : * Filter information will be persisted across page loads by specifying a * <code>stateId</code> in the Grid configuration. * <div class="sub-desc"> * The filter collection binds to the * <code>{@link Ext.grid.GridPanel#beforestaterestore beforestaterestore}</code> * and <code>{@link Ext.grid.GridPanel#beforestatesave beforestatesave}</code> * events in order to be stateful. * </div></li> * <li><b>Grid Changes</b> : * <div class="sub-desc"><ul> * <li>A <code>filters</code> <i>property</i> is added to the grid pointing to * this plugin.</li> * <li>A <code>filterupdate</code> <i>event</i> is added to the grid and is * fired upon onStateChange completion.</li> * </ul></div></li> * <li><b>Server side code examples</b> : * <div class="sub-desc"><ul> * <li><a href="http://www.vinylfox.com/extjs/grid-filter-php-backend-code.php">PHP</a> - (Thanks VinylFox)</li> * <li><a href="http://extjs.com/forum/showthread.php?p=77326#post77326">Ruby on Rails</a> - (Thanks Zyclops)</li> * <li><a href="http://extjs.com/forum/showthread.php?p=176596#post176596">Ruby on Rails</a> - (Thanks Rotomaul)</li> * <li><a href="http://www.debatablybeta.com/posts/using-extjss-grid-filtering-with-django/">Python</a> - (Thanks Matt)</li> * <li><a href="http://mcantrell.wordpress.com/2008/08/22/extjs-grids-and-grails/">Grails</a> - (Thanks Mike)</li> * </ul></div></li> * </ul></div> * <p><b><u>Example usage:</u></b></p> * <pre><code> var store = new Ext.data.GroupingStore({ ... });
    var filters = new Ext.ux.grid.GridFilters({ autoReload: false, //don't reload automatically local: true, //only filter locally // filters may be configured through the plugin, // or in the column definition within the column model configuration filters: [{ type: 'numeric', dataIndex: 'id' }, { type: 'string', dataIndex: 'name' }, { type: 'numeric', dataIndex: 'price' }, { type: 'date', dataIndex: 'dateAdded' }, { type: 'list', dataIndex: 'size', options: ['extra small', 'small', 'medium', 'large', 'extra large'], phpMode: true }, { type: 'boolean', dataIndex: 'visible' }] }); var cm = new Ext.grid.ColumnModel([{ ... }]);
    var grid = new Ext.grid.GridPanel({ ds: store, cm: cm, view: new Ext.grid.GroupingView(), plugins: [filters], height: 400, width: 700, bbar: new Ext.PagingToolbar({ store: store, pageSize: 15, plugins: [filters] //reset page to page 1 if filters change }) });
    store.load({params: {start: 0, limit: 15}});
    // a filters property is added to the grid grid.filters * </code></pre> */ Ext.ux.grid.GridFilters = Ext.extend(Ext.util.Observable, { /** * @cfg {Boolean} autoReload * Defaults to true, reloading the datasource when a filter change happens. * Set this to false to prevent the datastore from being reloaded if there * are changes to the filters. See <code>{@link updateBuffer}</code>. */ autoReload : true, /** * @cfg {Boolean} encode * Specify true for {@link #buildQuery} to use Ext.util.JSON.encode to * encode the filter query parameter sent with a remote request. * Defaults to false. */ /** * @cfg {Array} filters * An Array of filters config objects. Refer to each filter type class for * configuration details specific to each filter type. Filters for Strings, * Numeric Ranges, Date Ranges, Lists, and Boolean are the standard filters * available. */ /** * @cfg {String} filterCls * The css class to be applied to column headers with active filters. * Defaults to <tt>'ux-filterd-column'</tt>. */ filterCls : 'ux-filtered-column', /** * @cfg {Boolean} local * <tt>true</tt> to use Ext.data.Store filter functions (local filtering) * instead of the default (<tt>false</tt>) server side filtering. */ local : false, /** * @cfg {String} menuFilterText * defaults to <tt>'Filters'</tt>. */ menuFilterText : 'Filters', /** * @cfg {String} paramPrefix * The url parameter prefix for the filters. * Defaults to <tt>'filter'</tt>. */ paramPrefix : 'filter', /** * @cfg {Boolean} showMenu * Defaults to true, including a filter submenu in the default header menu. */ showMenu : true, /** * @cfg {String} stateId * Name of the value to be used to store state information. */ stateId : undefined, /** * @cfg {Integer} updateBuffer * Number of milliseconds to defer store updates since the last filter change. */ updateBuffer : 500,
    /** @private */ constructor : function (config) { this.deferredUpdate = new Ext.util.DelayedTask(this.reload, this); this.filters = new Ext.util.MixedCollection(); this.filters.getKey = function (o) { return o ? o.dataIndex : null; }; this.addFilters(config.filters); delete config.filters; Ext.apply(this, config); },
    /** @private */ init : function (grid) { if (grid instanceof Ext.grid.GridPanel) { this.grid = grid;
    this.bindStore(this.grid.getStore(), true);
    this.grid.filters = this;
    this.grid.addEvents({'filterupdate': true});
    grid.on({ scope: this, beforestaterestore: this.applyState, beforestatesave: this.saveState, beforedestroy: this.destroy, reconfigure: this.onReconfigure });
    if (grid.rendered){ this.onRender(); } else { grid.on({ scope: this, single: true, render: this.onRender }); }
    } else if (grid instanceof Ext.PagingToolbar) { this.toolbar = grid; } },
    /** * @private * Handler for the grid's beforestaterestore event (fires before the state of the * grid is restored). * @param {Object} grid The grid object * @param {Object} state The hash of state values returned from the StateProvider. */ applyState : function (grid, state) { var key, filter; this.applyingState = true; this.clearFilters(); if (state.filters) { for (key in state.filters) { filter = this.filters.get(key); if (filter) { filter.setValue(state.filters[key]); filter.setActive(true); } } } this.deferredUpdate.cancel(); if (this.local) { this.reload(); } delete this.applyingState; },
    /** * Saves the state of all active filters * @param {Object} grid * @param {Object} state * @return {Boolean} */ saveState : function (grid, state) { var filters = {}; this.filters.each(function (filter) { if (filter.active) { filters[filter.dataIndex] = filter.getValue(); } }); return (state.filters = filters); },
    /** * @private * Handler called when the grid is rendered */ onRender : function () { this.grid.getView().on('refresh', this.onRefresh, this); this.createMenu(); },
    /** * @private * Handler called by the grid 'beforedestroy' event */ destroy : function () { this.removeAll(); this.purgeListeners();
    if(this.filterMenu){ Ext.menu.MenuMgr.unregister(this.filterMenu); this.filterMenu.destroy(); this.filterMenu = this.menu.menu = null; } },
    /** * Remove all filters, permanently destroying them. */ removeAll : function () { if(this.filters){ Ext.destroy.apply(Ext, this.filters.items); // remove all items from the collection this.filters.clear(); } },
      /** * Changes the data store bound to this view and refreshes it. * @param {Store} store The store to bind to this view */ bindStore : function(store, initial){ if(!initial && this.store){ if (this.local) { store.un('load', this.onLoad, this); } else { store.un('beforeload', this.onBeforeLoad, this); } } if(store){ if (this.local) { store.on('load', this.onLoad, this); } else { store.on('beforeload', this.onBeforeLoad, this); } } this.store = store; },
    /** * @private * Handler called when the grid reconfigure event fires */ onReconfigure : function () { this.bindStore(this.grid.getStore()); this.store.clearFilter(); this.removeAll(); this.addFilters(this.grid.getColumnModel()); this.updateColumnHeadings(); },
    createMenu : function () { var view = this.grid.getView(), hmenu = view.hmenu;
    if (this.showMenu && hmenu) {
    this.sep = hmenu.addSeparator(); this.filterMenu = new Ext.menu.Menu({ id: this.grid.id + '-filters-menu' }); this.menu = hmenu.add({ checked: false, itemId: 'filters', text: this.menuFilterText, menu: this.filterMenu });
    this.menu.on({ scope: this, checkchange: this.onCheckChange, beforecheckchange: this.onBeforeCheck }); hmenu.on('beforeshow', this.onMenu, this); } this.updateColumnHeadings(); },
    /** * @private * Get the filter menu from the filters MixedCollection based on the clicked header */ getMenuFilter : function () { var view = this.grid.getView(); if (!view || view.hdCtxIndex === undefined) { return null; } return this.filters.get( view.cm.config[view.hdCtxIndex].dataIndex ); },
    /** * @private * Handler called by the grid's hmenu beforeshow event */ onMenu : function (filterMenu) { var filter = this.getMenuFilter();
    if (filter) { /* TODO: lazy rendering if (!filter.menu) { filter.menu = filter.createMenu(); } */ this.menu.menu = filter.menu; this.menu.setChecked(filter.active, false); // disable the menu if filter.disabled explicitly set to true this.menu.setDisabled(filter.disabled === true); }
    this.menu.setVisible(filter !== undefined); this.sep.setVisible(filter !== undefined); },
    /** @private */ onCheckChange : function (item, value) { this.getMenuFilter().setActive(value); },
    /** @private */ onBeforeCheck : function (check, value) { return !value || this.getMenuFilter().isActivatable(); },
    /** * @private * Handler for all events on filters. * @param {String} event Event name * @param {Object} filter Standard signature of the event before the event is fired */ onStateChange : function (event, filter) { if (event === 'serialize') { return; }
    if (filter == this.getMenuFilter()) { this.menu.setChecked(filter.active, false); }
    if ((this.autoReload || this.local) && !this.applyingState) { this.deferredUpdate.delay(this.updateBuffer); } this.updateColumnHeadings();
    if (!this.applyingState) { this.grid.saveState(); } this.grid.fireEvent('filterupdate', this, filter); },
    /** * @private * Handler for store's beforeload event when configured for remote filtering * @param {Object} store * @param {Object} options */ onBeforeLoad : function (store, options) { options.params = options.params || {}; this.cleanParams(options.params); var params = this.buildQuery(this.getFilterData()); Ext.apply(options.params, params); },
    /** * @private * Handler for store's load event when configured for local filtering * @param {Object} store * @param {Object} options */ onLoad : function (store, options) { store.filterBy(this.getRecordFilter()); },
    /** * @private * Handler called when the grid's view is refreshed */ onRefresh : function () { this.updateColumnHeadings(); },
    /** * Update the styles for the header row based on the active filters */ updateColumnHeadings : function () { var view = this.grid.getView(), hds, i, len, filter; if (view.mainHd) { hds = view.mainHd.select('td').removeClass(this.filterCls); for (i = 0, len = view.cm.config.length; i < len; i++) { filter = this.getFilter(view.cm.config[i].dataIndex); if (filter && filter.active) { hds.item(i).addClass(this.filterCls); } } } },
    /** @private */ reload : function () { if (this.local) { this.grid.store.clearFilter(true); this.grid.store.filterBy(this.getRecordFilter()); } else { var start, store = this.grid.store; this.deferredUpdate.cancel(); if (this.toolbar) { start = store.paramNames.start; if (store.lastOptions && store.lastOptions.params && store.lastOptions.params[start]) { store.lastOptions.params[start] = 0; } } store.reload(); } },
    /** * Method factory that generates a record validator for the filters active at the time * of invokation. * @private */ getRecordFilter : function () { var f = [], len, i; this.filters.each(function (filter) { if (filter.active) { f.push(filter); } });
    len = f.length; return function (record) { for (i = 0; i < len; i++) { if (!f[i].validateRecord(record)) { return false; } } return true; }; },
    /** * Adds a filter to the collection and observes it for state change. * @param {Object/Ext.ux.grid.filter.Filter} config A filter configuration or a filter object. * @return {Ext.ux.grid.filter.Filter} The existing or newly created filter object. */ addFilter : function (config) { var Cls = this.getFilterClass(config.type), filter = config.menu ? config : (new Cls(config)); this.filters.add(filter);
    Ext.util.Observable.capture(filter, this.onStateChange, this); return filter; },
    /** * Adds filters to the collection. * @param {Array/Ext.grid.ColumnModel} filters Either an Array of * filter configuration objects or an Ext.grid.ColumnModel. The columns * of a passed Ext.grid.ColumnModel will be examined for a <code>filter</code> * property and, if present, will be used as the filter configuration object. */ addFilters : function (filters) { if (filters) { var i, len, filter, cm = false, dI; if (filters instanceof Ext.grid.ColumnModel) { filters = filters.config; cm = true; } for (i = 0, len = filters.length; i < len; i++) { filter = false; if (cm) { dI = filters[i].dataIndex; filter = filters[i].filter || filters[i].filterable; if (filter){ filter = (filter === true) ? {} : filter; Ext.apply(filter, {dataIndex:dI}); // filter type is specified in order of preference: // filter type specified in config // type specified in store's field's type config filter.type = filter.type || this.store.fields.get(dI).type; } } else { filter = filters[i]; } // if filter config found add filter for the column if (filter) { this.addFilter(filter); } } } },
    /** * Returns a filter for the given dataIndex, if one exists. * @param {String} dataIndex The dataIndex of the desired filter object. * @return {Ext.ux.grid.filter.Filter} */ getFilter : function (dataIndex) { return this.filters.get(dataIndex); },
    /** * Turns all filters off. This does not clear the configuration information * (see {@link #removeAll}). */ clearFilters : function () { this.filters.each(function (filter) { filter.setActive(false); }); },
    /** * Returns an Array of the currently active filters. * @return {Array} filters Array of the currently active filters. */ getFilterData : function () { var filters = [], i, len;
    this.filters.each(function (f) { if (f.active) { var d = [].concat(f.serialize()); for (i = 0, len = d.length; i < len; i++) { filters.push({ field: f.dataIndex, data: d[i] }); } } }); return filters; },
    /** * Function to take the active filters data and build it into a query. * The format of the query depends on the <code>{@link #encode}</code> * configuration: * <div class="mdetail-params"><ul> * * <li><b><tt>false</tt></b> : <i>Default</i> * <div class="sub-desc"> * Flatten into query string of the form (assuming <code>{@link #paramPrefix}='filters'</code>: * <pre><code> filters[0][field]="someDataIndex"& filters[0][data][comparison]="someValue1"& filters[0][data][type]="someValue2"& filters[0][data][value]="someValue3"& * </code></pre> * </div></li> * <li><b><tt>true</tt></b> : * <div class="sub-desc"> * JSON encode the filter data * <pre><code> filters[0][field]="someDataIndex"& filters[0][data][comparison]="someValue1"& filters[0][data][type]="someValue2"& filters[0][data][value]="someValue3"& * </code></pre> * </div></li> * </ul></div> * Override this method to customize the format of the filter query for remote requests. * @param {Array} filters A collection of objects representing active filters and their configuration. * Each element will take the form of {field: dataIndex, data: filterConf}. dataIndex is not assured * to be unique as any one filter may be a composite of more basic filters for the same dataIndex. * @return {Object} Query keys and values */ buildQuery : function (filters) { var p = {}, i, f, root, dataPrefix, key, tmp, len = filters.length;
    if (!this.encode){ for (i = 0; i < len; i++) { f = filters[i]; root = [this.paramPrefix, '[', i, ']'].join(''); p[root + '[field]'] = f.field;
    dataPrefix = root + '[data]'; for (key in f.data) { p[[dataPrefix, '[', key, ']'].join('')] = f.data[key]; } } } else { tmp = []; for (i = 0; i < len; i++) { f = filters[i]; tmp.push(Ext.apply( {}, {field: f.field}, f.data )); } // only build if there is active filter if (tmp.length > 0){ p[this.paramPrefix] = Ext.util.JSON.encode(tmp); } } return p; },
    /** * Removes filter related query parameters from the provided object. * @param {Object} p Query parameters that may contain filter related fields. */ cleanParams : function (p) { // if encoding just delete the property if (this.encode) { delete p[this.paramPrefix]; // otherwise scrub the object of filter data } else { var regex, key; regex = new RegExp('^' + this.paramPrefix + '\[[0-9]+\]'); for (key in p) { if (regex.test(key)) { delete p[key]; } } } },
    /** * Function for locating filter classes, overwrite this with your favorite * loader to provide dynamic filter loading. * @param {String} type The type of filter to load ('Filter' is automatically * appended to the passed type; eg, 'string' becomes 'StringFilter'). * @return {Class} The Ext.ux.grid.filter.Class */ getFilterClass : function (type) { // map the supported Ext.data.Field type values into a supported filter switch(type) { case 'auto': type = 'string'; break; case 'int': case 'float': type = 'numeric'; break; } return Ext.ux.grid.filter[type.substr(0, 1).toUpperCase() + type.substr(1) + 'Filter']; } });
    // register ptype
    Ext.preg('gridfilters', Ext.ux.grid.GridFilters);

  6. #46
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    795
    Vote Rating
    37
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    Quote Originally Posted by mjlecomte View Post
    FAQs

    1. Where can I download or demo this extension? This extension is currently only in svn. To access svn you must be a svn subscriber. This extension will be included with the ExtJS 3.1 release which is estimated to be released November 15, 2009.
    Hmm, is this really the case?

    I can't see it in the API Docs

    Cheers,
    Westy

  7. #47
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Quote Originally Posted by westy View Post
    Hmm, is this really the case?

    I can't see it in the API Docs

    Cheers,
    Westy
    It's included as an example (which unfortunately aren't in the API docs).

  8. #48
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    795
    Vote Rating
    37
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    Ah ok, thanks Condor

  9. #49
    Ext JS Premium Member dtex-lab's Avatar
    Join Date
    Sep 2009
    Location
    Italy
    Posts
    341
    Vote Rating
    1
    dtex-lab is on a distinguished road

      0  

    Default


    Hi
    I'm using extjs 3.1 and I need to extends/override the base
    Ext.ux.grid.GridFilters in order to intercept filter and apply my business logic instead of the standard one when the user apply the filter (in my case I need to avoid local filter and execute an ajax request.. )

    To do it I override the onStateChange function
    Code:
    onStateChange : function (event, filter)


    and it is working fine for "StringFilter": when the the user push the enter button, the onStateChange event is called once with "event" = "activate"

    But when I have a BooleanFilter, my extension doesn't works
    the onStateChange event is called 3 times

    the first with event "activate", the 2nd and 3th time with event 'update'
    Only the lastest time the getValue() function on filter contains the right value...

    So probably I override the wrong function...

    What is the right one ?

    I have also another requirement on the ListFilter
    At this time the event is throws every time a user select an item.
    Instead I want thows the event only when the user push the enter button
    This is because I need to send a remote request... and so I must wait that the user finish to select items..

    Thanks

    we make IT work for you

  10. #50
    Sencha User
    Join Date
    Dec 2009
    Location
    Gdansk, Poland
    Posts
    23
    Vote Rating
    0
    stalek is on a distinguished road

      0  

    Default Missing filter param on GridFilters - EXT.JS 3.1 bug ?

    Missing filter param on GridFilters - EXT.JS 3.1 bug ?


    I have 6 params on my DirectStore. When any filter is not enabled (I use JSON encoding feature) the "onBeforeLoad" method removes "filter" parameter from parameters list and it's not reconstructed/added later in "buildQuery" method.

    Because of this I receive exception "Parameter count mismatch." during call. It's because "filter" parameter is missing (has been removed from parameters list). The method called by DirectPrivider (.net version) has such signature:

    Code:
    public MessageResult GetMessages(long start, long limit, string sort, string dir, string filter, string clientAppId)
    I was trying to avoid the problem adding method with overloaded parameters list like below, but DirectAction object uses Dictionary to store info about method names for methods it can call so we can't create two methods with the same name but with different parameters list.

    Code:
    [DirectMethod]
    // There is NO filter parameter here !!!
    public MessageResult GetMessages(long start, long limit, string sort, string dir, string clientAppId)
    {
        return GetMessages(start, limit, sort, dir,null, clientAppId);
    }
    Temporary I resolved the problem modifying the condition at the end of "buildQuery" method in GridFilters.js file.

    The old version was like this:

    Code:
    // only build if there is active filter 
    if (tmp.length > 0){
         p[this.paramPrefix] = Ext.util.JSON.encode(tmp);
    }
    My new version has "else" clause like in the code below:

    Code:
    // only build if there is active filter 
    if (tmp.length > 0){
          p[this.paramPrefix] = Ext.util.JSON.encode(tmp);
    }
    else
          p[this.paramPrefix] = null;

    Maybe somebody knows better solution...

    It worked quite well with version 3.0 (then I received null value on "filter" parameter and order and amount of parameters was proper).

    I don't see significant changes in GridFilters.js file between versions 3.0 and 3.1 ...

Thread Participants: 84

  1. VinylFox (1 Post)
  2. galdaka (2 Posts)
  3. Condor (10 Posts)
  4. cgi-bin (4 Posts)
  5. Fabyo (8 Posts)
  6. fshort (1 Post)
  7. digitalkaoz (1 Post)
  8. steffenk (2 Posts)
  9. brookd (1 Post)
  10. jamie.nicholson (1 Post)
  11. sawan (1 Post)
  12. froamer (1 Post)
  13. jaquet (1 Post)
  14. KevinChristensen (1 Post)
  15. bernd01 (2 Posts)
  16. tonedeaf (7 Posts)
  17. seg (1 Post)
  18. calavera (5 Posts)
  19. httpdotcom (1 Post)
  20. Timido (3 Posts)
  21. mfrancey (1 Post)
  22. WixSL (1 Post)
  23. drieraf (1 Post)
  24. nickweavers (2 Posts)
  25. goofy (1 Post)
  26. mynameisyoda (1 Post)
  27. manilodisan (1 Post)
  28. eyetv (1 Post)
  29. renoye (3 Posts)
  30. pouniok (2 Posts)
  31. mcouillard (6 Posts)
  32. Scorpie (1 Post)
  33. wiznia (1 Post)
  34. fulfowi (2 Posts)
  35. benmclendon (1 Post)
  36. roemisch (2 Posts)
  37. zeruyo (1 Post)
  38. dizor (1 Post)
  39. SunWuKung (5 Posts)
  40. mx_starter (1 Post)
  41. jimtyp (2 Posts)
  42. nitingautam (1 Post)
  43. westy (2 Posts)
  44. slemiere (1 Post)
  45. mike2406 (2 Posts)
  46. msinn (12 Posts)
  47. RanmaSaotome (1 Post)
  48. cnicolas (2 Posts)
  49. lsaffre (1 Post)
  50. astraschedule (1 Post)
  51. hankin (2 Posts)
  52. mrinaljena (1 Post)
  53. dtex-lab (1 Post)
  54. yohnan (2 Posts)
  55. Override (2 Posts)
  56. hjones (1 Post)
  57. hexawing (1 Post)
  58. taronja (6 Posts)
  59. asbestos girl (7 Posts)
  60. stalek (1 Post)
  61. mpawlowski (1 Post)
  62. DerSalz (1 Post)
  63. jimm (1 Post)
  64. blueberrymuffins (2 Posts)
  65. gleskinen (1 Post)
  66. pmdarrow (1 Post)
  67. Fallen Zen (1 Post)
  68. filippo.ferrari (6 Posts)
  69. george4rotech (2 Posts)
  70. Ebpo (1 Post)
  71. Reimius (1 Post)
  72. webtime (9 Posts)
  73. Christiand (1 Post)
  74. Oliver Specht (1 Post)
  75. novaku (1 Post)
  76. sizemorew (1 Post)
  77. # eof (1 Post)
  78. ldonofrio (3 Posts)
  79. david777 (1 Post)
  80. ExTriqui (4 Posts)
  81. leowyatt (7 Posts)
  82. JSassy (1 Post)
  83. hachie (1 Post)
  84. radmila80 (1 Post)

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar