0

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!

Shah
  • 4,878
  • 8
  • 25
  • 33

1 Answers1

2

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.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798