Hi Everyone,
I am new to the jqgrid and I recently builded one grid with the example I got form one of the forums. I got stuck at reloading the form after editing/adding/deleting. I have searched and worked on this for the last two days but I found nothing. Please help me on this.
Here is the code I am using
jQuery(document).ready(function(){
$.ajax(
{
type: “POST”,
url: someurl
data: somedata
dataType: “json”,
success: function(result)
{
colD = result.colData;
colN = result.colNames;
colM = result.colModel;
jQuery(“#list”).jqGrid({
jsonReader : {
repeatitems: false,
root:”dataset”,
cell: “”,
id: “Id”,
total:”total”,
page:”page”,
records:”records”
},
url:someurl
postData:somedata
datatype: 'jsonstring',
mtype: 'POST'
datastr : colD,
colNames: colN,
colModel: colM,
pager: '#pager',
rowNum: 10,
rowList: [10, 20, 50],
sortname: 'Id',
viewrecords: true,
sortorder: “asc”,
height: “75%”,
gridview: true,
loadonce:true,
editurl:editurl
loadComplete: function(data){
jQuery(“#list”).jqGrid('navGrid','#pager',{edit:true,add:true,del:true,search:true,refresh:true,view:true},
{
beforeShowForm:function(form)
{
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top