Skip to content Skip to sidebar Skip to footer

Jqgrid Set Url To Custom Button

I have a jqGrid in which I am trying to implement a custom button which will send request to Servlet. So far I have done this: .navButtonAdd('#pager10', { caption:'Activate ',

Solution 1:

Custom button added to navigator bar with respect of navButtonAdd allows to execute any JavaScript code when the user click on the button. So you can implement any action which you need. For example you can use jQuery.ajax to sent any information to the servlet or to assign new value to location.href to redirect to another URL. If needed you can get the rowid of currently selected row using the code like

var rowid = $(this).jqGrid("getGridParam", "selrow");

inside of onClickButton. So you can really implement any behavior which you need.

Post a Comment for "Jqgrid Set Url To Custom Button"