Hi,
I am trying to drill down a grid based on a couple of different drop downs. The first is brand, the second is department. So Im trying to make it so you can filter by brand, and then department, to drill down the grids data. -- My problem is that I am using server side filtering and paging, so it will work, but if I try to drill down a second param while the first is already selected in the drop down, my app doesent recognize that the first is selected and resubmits the entire drill down process, using just the 1 field. -- So basically Im just wondering what the best practice is to accomplish this, in making the dropdowns aware of each other and their states. (and I was going to hack it up using a php session stored variable, but I figure there is a better way and possibly built in way to do this using extjs?)
Here is the code Im working with.
Code:
var brandsCombo = {
xtype: 'combo',
store: brandsStore,
displayField: 'name',
valueField: 'id',
editable: false,
mode: 'remote',
forceSelection: true,
triggerAction: 'all',
emptyText: 'Select a brand...',
selectOnFocus: true,
listeners: {
'select': function(cmb, rec, idx) {
stylesStore.load({
params: { 'brand_id': this.getValue() }
});
}
}
}
Code:
var deptCombo = {
xtype: 'combo',
store: deptStore,
displayField: 'name',
valueField: 'id',
editable: false,
mode: 'remote',
forceSelection: true,
triggerAction: 'all',
emptyText: 'Select a Department...',
selectOnFocus: true,
listeners: {
'select': function(cmb, rec, idx) {
stylesStore.load({
params: { 'department_id': this.getValue() }
});
}
}
}
Any help would be much appreciated!