We are in the process of upgrading from 4.2.1 to 4.2.2 and are experiencing problems with grid panels.
The other problem appears to be due to the grid no longer reacting to filter changes on the underlying store. Previously, changing the filter would cause a selectionchange event to fire if the selected record did not match the filter criteria. With the new version this no longer appears to the case. I now have to add code to select/deselect a row after the filter has been applied.
Is there some way to get the previous functionality without having to write additional code?
The first issue involves moving the focus into the grid. I have found that if I do not select a row in the grid first, it is not possible to move the focus into the grid using the tab key. If I add code to the callback function when loading the grid I can get around the issue by selecting the first row. This wasn't necessary in the previous version.
Code:
store.load({
scope: this,
callback: function (records, operation, success) {
if (!success) {
....
}
else {
// This was not previously necessary
if (store.count() > 0)
grid.getSelectionModel().select(0);
}
}
});
The other problem appears to be due to the grid no longer reacting to filter changes on the underlying store. Previously, changing the filter would cause a selectionchange event to fire if the selected record did not match the filter criteria. With the new version this no longer appears to the case. I now have to add code to select/deselect a row after the filter has been applied.
Code:
var store = grid.getStore();
store.clearFilter();
if (facilityId != 0)
store.filter('facilityId', facilityId);
if (sourceId != 0)
store.filter('sourceId', sourceId);
if (orderNo.length > 0)
store.filter('orderNo', orderNo);
// This was not previously necessary
if (store.count() > 0)
grid.getSelectionModel().select(0);
else
grid.getSelectionModel().deselectAll();
Is there some way to get the previous functionality without having to write additional code?
Thanks
Aucun commentaire:
Enregistrer un commentaire