dp_vl
6 Jul 2011, 12:16 PM
Hello, I am new to Ext JS (using version 4) and have the following question:
I am trying to reload a grid base on the value of another field on the screen, the reloading is invoked when a button is clicked.
Here is the def of my datastore for the grid:
var dsGrid = new Ext.data.JsonStore({
autoLoad : false,
fields: ['fld1', 'fld2'],
proxy : {
type: 'ajax',
url: 'test.pgm',
extraparams: polnum : Ext.getCmp('NUMFLD').getValue()
reader: {
type: 'json',
root: 'somedata'
}
}
});
And in the button click event, I coded:
dsGrid.load();
As I can see the app is running cause everytime I click the button, the browser invokes the program on my server, yet the "polnum" parameter is not reflecting to the NUMFLD's value on the screen. It's always 0, or if I set NUMFLD's value after the "Ext.onReady(function()" statement, then it's always that static value gets passed to the server program.
Could anyone point out what I've done wrong?
Thanks,
DP
I am trying to reload a grid base on the value of another field on the screen, the reloading is invoked when a button is clicked.
Here is the def of my datastore for the grid:
var dsGrid = new Ext.data.JsonStore({
autoLoad : false,
fields: ['fld1', 'fld2'],
proxy : {
type: 'ajax',
url: 'test.pgm',
extraparams: polnum : Ext.getCmp('NUMFLD').getValue()
reader: {
type: 'json',
root: 'somedata'
}
}
});
And in the button click event, I coded:
dsGrid.load();
As I can see the app is running cause everytime I click the button, the browser invokes the program on my server, yet the "polnum" parameter is not reflecting to the NUMFLD's value on the screen. It's always 0, or if I set NUMFLD's value after the "Ext.onReady(function()" statement, then it's always that static value gets passed to the server program.
Could anyone point out what I've done wrong?
Thanks,
DP