1
votes

I have been using Dojo enhance grid filter plugin. My enhance grid is talking to server side stores and thus my filter criteria is also been sent to the server for getting the filtered data.

Dojo filter plugin provides atleast 9-10 filters like contains, "startswith", "endswith" etc.

In my server I have only filtering queries for 2 - 3 filters.

I am using "disabledConditions" for NOT showing criterias in the drop down of filter plugin.

After reading documentation I came to know about anyColumn to disable criteria's in the "Any Column" option in the drop down. Even if I give the entire list of criteria's as disabled in anycolumn, still I see the empty dropdown box.

var disabledArray1 = ["equalTo","startsWith", "notStartsWith","lessThan","lessThanOrEqualTo","largerThan","largerThanOrEqualTo","contains","endsWith","notEqualTo","notContains","notStartsWith","notEndsWith","range","isEmpty"];

filter: { itemsName: 'Survey Areas', closeFilterbarButton: true, ruleCount: 1, isServerSide: true, setupFilterQuery: setupFilter, anycolumn: disabledArray1 },

Is there a way I can delete the entry of "Any Column" from the drop down of plugin filter??

2

2 Answers

0
votes

I found no way other than a dirty hack like this :

dojo.forEach(dijit.byId('yourGridId').pluginMgr.getPlugin('filter').filterDefDialog._cboxes, function(criteriaBox) {
    var theSelect = criteriaBox._colSelect;
    theSelect.removeOption(theSelect.options[0]);
});

I assumed that the "anycolumn" option is the first in the select... feel free to add other checks before removing...

0
votes

I've just filed a bug with dojo. Let's see what they say: http://bugs.dojotoolkit.org/ticket/16604.