Dec 22, 2015, 10:05 AM
[CLOSED] Submit Grid data with Association - Razor 3.2.1
Hello
I have 2 grids master/detail using Association in parent store. similar to this example GridPanel - Parent/Child
I am trying to find best practice for submitting the data for the parent grid and the associated grid. I am using a JS function to call my controller action
I am getting values for the parent grid but no values for the child grid since you need to select a row first from parent before it is displaying in child grid.
Also, is there a way to tell if rows is modified, deleted, or added. Thank you for any help you can provide.
I have 2 grids master/detail using Association in parent store. similar to this example GridPanel - Parent/Child
I am trying to find best practice for submitting the data for the parent grid and the associated grid. I am using a JS function to call my controller action
I am getting values for the parent grid but no values for the child grid since you need to select a row first from parent before it is displaying in child grid.
Also, is there a way to tell if rows is modified, deleted, or added. Thank you for any help you can provide.
function saveForm(method, actionUrl, creationSuccessRedirectUrlOverride) {
var grids = Ext.ComponentQuery.query('gridpanel'),
i = 0;
var params = {};
for (; i < grids.length; i += 1) {
params['grid'+(i+1)] = Ext.encode(grids[i].getRowsValues());
}
//{
// dirtyRowsOnly: true
//}
params['grid99'] = Ext.encode(App.gpCoverageLimits.getRowsValues({ selectedOnly: false }));
Ext.net.directRequest({
cleanRequest: true,
eventMask: {showMask: true},
formId: 'formPanel',
method: method,
url: actionUrl,
extraParams: params,
userSuccess: function(response) {
onSaveSuccess(response, creationSuccessRedirectUrlOverride);
}
});
}
Last edited by fabricio.murta; Dec 22, 2015 at 7:52 PM.
Reason: Closed