Threaded View
-
16 Nov 2012 12:30 AM #1
Answered: How to use extraParams?
Answered: How to use extraParams?
Hi,
First I am sending a request (param) to the server and using the same PHP for another grid, but that grid doesn't give me data with passed param
, but when I send param in the url I can get it done. When I searched for it, there is an object extraParams, I am using like,
This doesn't seem to work, it isn't sending the extra parameter. What am I doing wrong?Code:{ xtype: 'gridpanel', url: 'php/update.php', extraParams: { 'columnname': selectedField } }
Thanks.
-
Best Answer Posted by willigogs
Where are you wanting to build the array of selected field values? You shouldn't do this on every checkbox select, but rather just prior to performing your AJAX call (I'm assuming on a button push somewhere?).
You can then pass "arr" as your extra param during the AJAX call.Code:var selections = Ext.getCmp('your_grid_id').getSelectionModel().getSelection(); var arr = []; Ext.each(selections, function(rec, index) { arr.push(rec.get('Field')); });


Reply With Quote