Vote count:
0
Through a form Dialog, I'm sending a request to the server to update/delete/Add row. I'm looking to reload the gridx/Grid after I send the request. I'm using a JsonRest that targets my servlet which later requests an updated table from database server. Is there a simple way to do this? jsfiddle:http://ift.tt/1mmMIqn
userColumns = [
{id:'uuid', field: 'uuid', name: 'User UUID', width: 'auto'},
{id:'user_name', field: 'user_name', name: 'UName', width: '7%'},
{id:'first_name', field: 'first_name', name: 'FName', width: '0px'},
{id:'last_name', field: 'last_name', name: 'LName', width: '0px'},
{id:'start_date', field: 'start_date', name: 'Start', width: '0px'},
{id:'end_date', field: 'end_date', name: 'End', width: '10%'},
{id:'subj_info', field: 'subj_info', name: 'Subject Info', width: 'auto'},
{id:'issuer_info', field: 'issuer_info', name: 'Issuer Info',width: 'auto'},
{id:'UpdateBtn', field: 'action', name: '', width: '6%', widgetsInCell: true,
decorator: function(){
return "<button data-dojo-type='dijit/form/Button' data-dojo-props=
iconClass:'dijitIconEdit' " + "data-dojo-attach-point='btn'>Update</button>";
},
// setCellValue call etc....
);}}],
userGrid = new Grid({
id: 'userGrid',
cacheClass: Cache,
store: userStore,
structure: userColumns,
modules: [Resizer, Sort, Pagination, Filter, Bar,
"gridx/modules/CellWidget",
"gridx/modules/Edit", "gridx/modules/select/Row", "gridx/modules/select/Cell",
]}, 'usersNode'),
******************************* Form *******************************************
<div data-dojo-type="dijit/Dialog" data-dojo-id="myFormDialog2" title="Update User
Certificate" style="display: none">
<form data-dojo-type="dijit/form/Form" id="myForm2" encType="multipart/form-data"
action="addUser/update" method="post" target="uploadTrg">
User: <div id="first_name" ></div> <div id="last_name"></div>
<input id="uuid" name="uuid" type="hidden"/>
<input id="first_name2" name="fname" type="hidden"/>
<input id="last_name2" name="lname" type="hidden" />
<input id="user_name2" name="user_name" type="hidden"/>
<p>Upload Cert:
<input type="file" name="fileName" />
</p>
<div class="dijitDialogPaneActionBar">
<button data-dojo-type="dijit/form/Button" type="submit" onClick="return
myFormDialog2.hide();">Submit</button>
<button data-dojo-type="dijit/form/Button" type="button" onClick="return
myFormDialog2.hide();">Cancel</button>
</div>
</form>
</div>
asked 27 secs ago
Call to refresh Grid after sending request to server
Aucun commentaire:
Enregistrer un commentaire