Apr 18, 2013, 10:25 AM
[CLOSED] [#213] Problem with storeHasSelected
Hi there,
I ran into a problem when switching to ext.net 2.2 :
I'm applying a filter to a store of a gridpanel via a combobox.
ext.js seems not to have
I searched and found an open bug with a fix:
http://www.sencha.com/forum/showthread.php?258397
It seems to fix the problem, but the bug is still open at sencha.
When will the fix be included to ext.net ?
Regards,
Holger
I ran into a problem when switching to ext.net 2.2 :
I'm applying a filter to a store of a gridpanel via a combobox.
ext.js seems not to have
records.length
anymore.I searched and found an open bug with a fix:
http://www.sencha.com/forum/showthread.php?258397
storeHasSelected: function(record) {
var store = this.store,
records,
len, id, i;
if (record.hasId() && store.getById(record)) {
return true;
} else {
records = store.data.items;
len = records ? records.length : 0; //<------- fix
//len = records.length; //<------- problem
id = record.internalId;
for (i = 0; i < len; ++i) {
if (id === records[i].internalId) {
return true;
}
}
}
return false;
}
var applyFilter = function (field, dataIndex) {
//var store = App.gridPanel_ES_EinsatzVollstaendig.getStore();
var gridPanelComponent = field.up().up().up().up();
var store = gridPanelComponent.getStore();
var valueToFilter = field.getValue();
store.filter({
property: dataIndex,
value: valueToFilter,
exactMatch: true,
caseSensitive: true
});
//store.filter(dataIndex, valueToFilter);
if (isDebug) {
}
};
It seems to fix the problem, but the bug is still open at sencha.
When will the fix be included to ext.net ?
Regards,
Holger
Last edited by Baidaly; May 30, 2013 at 6:54 AM.
Reason: [CLOSED]