Apr 02, 2013, 2:05 PM
[FIXED] [#247] [2.x] Filters don't work with locked GridPanel
Hi,
My GridPanel is created dynamically in codebehind from database (Filters/Columns vary). If any column gets locked the GridPanel splits and filters
only work on locked side. If a column is locked after render it gets the filter as well but as soon as unlocked, filter is gone again.
After some research we came to the conclusion that somehow the lockedconfig gets the filters but normalconfig doesnt. We tried out all
workarounds we could find but as an example this just makes filters disappear from locked side as well...
this one throws Null-reference exception (for "NormalGridConfig"):
Is there a way to get the filters to BOTH (locked and normal) parts of the Grid?
Best regard
Thomas
My GridPanel is created dynamically in codebehind from database (Filters/Columns vary). If any column gets locked the GridPanel splits and filters
only work on locked side. If a column is locked after render it gets the filter as well but as soon as unlocked, filter is gone again.
After some research we came to the conclusion that somehow the lockedconfig gets the filters but normalconfig doesnt. We tried out all
workarounds we could find but as an example this just makes filters disappear from locked side as well...
Ext.override(Ext.grid.Panel, {
normalCfgCopy: ['invalidateScrollerOnRefresh', 'verticalScroller', 'verticalScrollDock', 'verticalScrollerType', 'scroll', 'features'],
lockedCfgCopy: ['invalidateScrollerOnRefresh', 'features']
});
(also tried defaultvalues + 'features')this one throws Null-reference exception (for "NormalGridConfig"):
[...]
NewCol.Locked = true;
[...]
NewFiltercol.Add(NewFilter);
[...]
NewGridPanel.ColumnModel.Columns.Add(NewCol);
[...]
NewGridFilters.Filters.AddRange(NewFiltercol);
NewGridPanel.Features.Add(NewGridFilters);
[...]
NewGridPanel.NormalGridConfig.Features.Add(NewGridFilters);//<== without this line it works (as described) on locked side
[...]
Is there a way to get the filters to BOTH (locked and normal) parts of the Grid?
Best regard
Thomas
Last edited by fabricio.murta; Apr 27, 2016 at 12:23 AM.