Jun 04, 2010, 12:03 PM
[CLOSED] Remote GridFilter is not removed
Hello,
I´ve implemented a dynamic solution of the Reemote GridFilter:
https://examples1.ext.net/#/GridPane...ilters_Remote/
The filtering itself works fine now, but I cannot remove a filter.
When I remove a filter (uncheck the checkbox), the defined filter still remains.
I also can see that in firebug (see also attached screenshot):
It´s a bit complicated to provide a working example of my dynamic solution,
so I hope these codesnippets are enough to solve my problem.
Regards,
Martin
I´ve implemented a dynamic solution of the Reemote GridFilter:
https://examples1.ext.net/#/GridPane...ilters_Remote/
The filtering itself works fine now, but I cannot remove a filter.
When I remove a filter (uncheck the checkbox), the defined filter still remains.
I also can see that in firebug (see also attached screenshot):
gridfilters<code aria-selected="true" tabindex="0" role="listitem" class="focusRow
subFocusRow a11yModified">{"f_0_field":"GERAET_CODE","f_0_data_type":"string","f_0_data_value":"AE-TEST"}</code>
The filters are defined like this:private void InitColumnModel() {
if (_tableConfig.HeaderRowFilter) {
GridFilters filters = new GridFilters();
filters.ID = "DynamicSearchGridFilters";
if (_tableConfig.RequestMode == RequestModeType.Local)
filters.Local = true;
if (DynamicSearchGridPanel.Plugins.Count > 0)
DynamicSearchGridPanel.Plugins[0] = filters;
else
DynamicSearchGridPanel.Plugins.Add(filters);
}
foreach (ColumnConfig cc in _tableConfig.SearchColumns.Values) {
Column c = ExtNETUtils.LoadColumn(cc);
//HeaderColumn hc = GenerateHeaderFilterControl(cc);
GridFilter gf = GenerateGridFilter(cc);
//..
if (gf != null) {
(DynamicSearchGridPanel.Plugins[0] as GridFilters).Filters.Add(gf);
}
//...
}
private GridFilter GenerateGridFilter(ColumnConfig cc) {
if (!_tableConfig.HeaderRowFilter)
return null;
GridFilter gf = null;
if (Utils.IsBoolean(cc.Schema)) {
gf = new BooleanFilter();
} else if (Utils.IsNumeric(cc.Schema) && !cc.Schema.IsForeignKey) {
gf = new NumericFilter();
} else if (DateTimeUtils.IsDateTime(cc.Schema)) {
gf = new DateFilter();
} else {
gf = new StringFilter();
}
gf.DataIndex = cc.ColumnName;
}
It´s a bit complicated to provide a working example of my dynamic solution,
so I hope these codesnippets are enough to solve my problem.
Regards,
Martin