I am implementing jqgrid using struts2-jqgrid-plugin. My problem is when I change a value of hidden field in form-element ,the updated values are not reflected when i post these hidden field with my jqgrid.
My form with jqgrid
<form name="adminFrm" id="adminFrm">
<div>
<s:url var="remoteurl" action="adminJsontable">
</s:url>
<sjg:grid
id="gridtable"
caption="Issue-Summary"
dataType="json"
href="%{remoteurl}"
pager="true"
gridModel="finalGridModel"
rowList="10,20,25,30"
rowNum="10"
rownumbers="true"
width="1250"
loadingText="Dashboard is being Loaded..."
formIds="adminFrm" // here I am sending all form-elements
gridview="true"
>
<sjg:gridColumn name="issue_id" id="issueId" index="id" title="Issue-ID" formatter="integer" formatoptions="{thousandsSeparator: ''}" sortable="false" width="100"/>
<sjg:gridColumn name="issue_status" index="issue_status" title="Current Status" search="true" searchoptions="{value:':Any;Completed:Completed;Assigned:Assigned;Denied:Denied'}" searchtype="select"/>
</sjg:grid>
</div>
<s:hidden name="hidden_field" id="hidden_field" value="123456"></s:hidden>
</form>
Here i am trying to update the hidden field value on some event
function x()
{
$("#hidden_field").val("Value changed");
}
But when jqgrid reloads, it still posting the previous value of hidden field i.e. 12345 instead updated value. I checked the hidden field using firebug ,that is also showing that the value of hidden field has been changed then why jqgrid is still posting the previous value to server(which i checked via firebug) which does not exist on page. how to solve this problem. for details you can refer this post issue with ajax call on paging in jqgrid