I have got an asp.net form, with a jqgrid on it. The user can enter an account number on a main form, and then enter some data onto a jqgrid.
At the point the user saves the row in the grid, i would also like to pass the account number across from the form to the save proc, as we use this to work out some discount info for the lines in the grid.
I'm not sure how at the point of saving to pass this information accross?
UPDATE
I'm using json as my datatype, using inline editing and using editurl to post the grid to a web service that deals with saving it to a back end database.
UPDATE 2 - Solution
This is the code i have used to pass the value of a text box to along with the normal post data
jQuery(grid).jqGrid('inlineNav', "#pager", { edit: false, add: true, del: false, search: false,
//add the extra params to the post call
addParams: {
useDefValues: true,
addRowParams: {
keys: true,
aftersavefunc: reloadGrid,
extraparam: { accNo: getAccNumber, colourName: getColName }
}
},
editParams: {
keys: true,
aftersavefunc: reloadGrid,
extraparam: { accNo: getAccNumber, colourName: getColName }
}
});
This function gets the value of the asp.net text box
//get the value of the account number field
getAccNumber = function () {
return $("#<%= txtAccNo.ClientID %>").val();
};