View Full Version : [CLOSED] Is there a grid filters extension to select rows with empty (null) field values?

May 19, 2015, 5:11 PM

I have a case where the users have to enter missing values (they are sparse) and I was thinking of providing a grid panel filter to select just the rows that are missing the values (the users need to see other data in order to know which values to put in the empty cells).

I found this: https://www.sencha.com/forum/showthread.php?238896-Little-Filter-Addon-empty-values-filtering and I was wondering if you have something similar integrated in Ext.Net.

In my case the columns contain dates but I guess this extension can be used with any columns.


May 19, 2015, 9:43 PM
Hello @bogc,

Sorry, as far as I can remember there is no such thing built in Ext.NET.

May 20, 2015, 11:16 PM
I ended up implementing my own.

Ext.define('Ext.ux.grid.filter.DateFilterEx', {
extend: 'Ext.ux.grid.filter.DateFilter',
alias: 'gridfilter.datex',
uses: ['Ext.ux.grid.filter.DateFilter', 'Ext.menu.Menu'],

emptyText: 'Empty values',

menuItems: ['before', 'after', '-', 'on', '-', 'empty'],

compareMap: {
before: 'lt',
after: 'gt',
on: 'eq',
empty: 'empty'

init: function (config)


// Let's remove the date menu associated with empty

this.fields.empty.menu = null;

onCheckChange : function(item, checked)
var me = this;

if (item == this.fields.empty)
me.fireEvent('update', me);

validateRecord: function (record)
var val = record.get(this.dataIndex);

// If we want to see empty values and this is not an empty value then
// don't include this row
if (this.fields.empty.checked && val != null)
return false;

// If the value is null and any of the other filters are on then don't include any record
// because it doesn't make sense to compare a null against an existing date. If none of the filters
// are on then include the row
if (val == null)
return !this.fields.on.checked && !this.fields.before.checked && !this.fields.after.checked;

return this.callParent(arguments);

May 22, 2015, 10:43 AM
Thank you very much for sharing!