PDA

View Full Version : Send array param in grid.store.



anpegar
18 Feb 2011, 5:16 AM
Hi, How to send array params type from grid store?

I want to send a param "p_param" with n values.
Example:
p_param: 'value1',
p_param: 'value2',
p_param: 'valueN',

vGrid.store.load({params: {"p_param":"P_ID_CARPETA", "p_param":"P_BUSCAR", "p_value":vParams[0], "p_value":Ext.getCmp('cBuscar').getValue()}});



This sentence send only p_param: P_BUSCAR and p_value: 'myvalor', my server only receives the last parameter.

Regards.

carl23934
18 Feb 2011, 5:49 AM
You need to use an array if you want to send an array:



vGrid.store.load({
params: {
"p_param":["P_ID_CARPETA", "P_BUSCAR"]
,"p_value":[vParams[0], Ext.getCmp('cBuscar').getValue()]
}
});

anpegar
20 Feb 2011, 11:22 PM
carl23934, works fine !!
Thank you very much for your help.