November 2nd, 2014

Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Unable to add row to jqgrid using jsonstring
New Member
Forum Posts: 1
Member Since:
sp_UserOfflineSmall Offline

I have set up a jqgrid which is populated using a jsonstring from my servlet. I am trying to use the jqgrid form editing to add a new row. My grid only contains two columns: product and edit (only product is editable). I want to add rows to the grid without sending the data to my servlet but I am unsure how. So far I have stopped the error "no url set" by using  cellsubmit: 'clientArray',  cellEdit: true,  editurl:${dummyUrl} but nothing is added to the grid.

I have seen a forum post suggesting to use "beforeSubmit : function(postdata, formid)" but I am unsure how to add the postData to the jsonstring in the function.

My code:


jsonReader: {

root: "products",

repeatitems: false,

cell: "",  

id: "id", 


datatype: "jsonstring",

datastr: ${productData},

height: 100,

loadonce: true,

colNames:['Product', 'Edit'],



{name:'product', index:'product', width:150, editable:true},

{ name:'edit',index:'edit', width: 50, align:'center', sortable: false, search: false,


return "<span class='ui-icon ui-icon-pencil'></span>"



caption: "Products",

pager: "#productPager",

pgbuttons: false,

pgtext: null,

viewrecords: true,

editurl: ${dummyUrl},

cellEdit: true,

cellsubmit: 'clientArray',


jQuery("#productTable").jqGrid('navGrid',"#productPager",{edit:false, add:true, del:false, search:false, refresh:false});




Forum Timezone: Europe/Sofia

Most Users Ever Online: 496

Currently Online:
43 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam,

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information