Reputation: 5018
tried looking in the documentation but could not find.
Is there a way in which i can do a post to the server using custom button and not invoke a edit/add screeen?
jQuery("#mytreegrid").jqGrid('navButtonAdd',"#ptreegrid",
{caption:"",title:"Move Up", buttonicon :'ui-icon-arrowthick-1-n',
onClickButton:function(){
// calling something similar to onclickSubmit where i can construct
// my post body or set urls like onclickSubmit: function(rp_ge, postdata)
}
});
Help will be much appreciated!
Upvotes: 0
Views: 2017
Reputation: 221997
If you compare the code which will be executed if the user click on the "Edit" button (see here) with onClickButton
of the navButtonAdd you will see what you should do. You need just get the rowid of the current selected row selrow
(or selected rows selarrrow
) and do what you need. To send any information to the server you can use jQuery.ajax. To get the row contain of the row you can use getRowData for example. See this this and here old answers for detailes.
Upvotes: 2