Forum


11:54

12/11/2009

I have problem integration addional data into a formsubmit. I using the form whcih comes witzh jqgrid, not inline cell editing:
I have to add a addional values like referenkey from a parent object to the form submit:
thus I added
onclickSubmit:function(){return {item_id:};},
editData: {item_id:11},
according to the doc. Both should add a parameter 'utem_id' with value 11 to the postrequest. But it doesn't!
Also I noticed that onclickSubmit doesn't get fired after clicking submit. I checked with
onclickSubmit:function(){alert('hi);},
Is this a bug? I working on that since hours...
jQuery("#itinerarygrid").jqGrid({
url:'remote/product.cfc?method=getItineraries',
editurl: 'remote/MyProxy.cfc?method=doProcess&event=admin.product.saveItinerary',
onclickSubmit:function(){return {item_id:"11"};},
datatype: 'json',
mtype: 'POST',
colNames:['ID','Day','Label','Description','Meals','From','To'],
colModel :[
{name:'itinerary_id',index:'itinerary_id', hidden:true},
{name:'daynumber', index:'daynumber',width:25,align:'center', editable:true, edittype:'text',editrules:{number:true},editoptions:{size:6}},
{name:'label', index:'label', editable:true, edittype:'text',editoptions:{size:37}},
{name:'description', index:'description', editable:true, edittype:'textarea',editoptions: {rows:"8",cols:"33"}},
{name:'meals', index:'meals',editable:true, edittype:'textarea'}
],
key:'itinerary_id',
pager: '#ig_pager',
rowNum:10,
rowList:[10,20,30],
sortname: 'daynumber',
sortorder: 'asc',
height:"auto",
width:'680',
viewrecords: true,
jsonReader: {
repeatitems : false,
id: "itinerary_id"
},
ondblClickRow: function(rowid){
jQuery("#itinerarygrid").editGridRow( rowid);
},
imgpath: 'includes/styles/images',
caption: 'Tours Itineraries'
}).navGrid('#pager',{edit:true,add:true,del:true,search:false})
});
06:37

Moderators
30/10/2007

Hello,
onclickSubmit should be added in editGridRow method and not as grid parameter.
More you can find here:
http://www.trirand.com/jqgridw.....ditgridrow
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
58 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, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66