May 24, 2016, 10:57 AM
ListFilter override validateRecord
Hello guys! i've added listfilter like this
By default, list filter finds all row, which contains strings that equal to one of the selected filter options. But i need to find rows that contain option as substring.
I need to override this method:
var categoriesFilter = new ListFilter();
categoriesFilter.DataIndex = "Categories";
categoriesFilter.Options = ----;
GridFilters1.Filters.Add(categoriesFilter);
in my cs file.By default, list filter finds all row, which contains strings that equal to one of the selected filter options. But i need to find rows that contain option as substring.
I need to override this method:
Ext.ux.grid.filter.ListFilter.override({
validateRecord : function (record) {
var valuesArray = this.getValue();
return Ext.Array.indexOf(valuesArray, record.get(this.dataIndex)) > -1;
}
})
but i'm don't how. (i'm new in js)