I want to add three buttons on top of the grid for add,edit,delete. And want to make calls to separate URLs for each of the operation.I want to use Form Editing for this. Can anyone suggest me a sample code for this.
Thanks in advance, Abhishek
I want to add three buttons on top of the grid for add,edit,delete. And want to make calls to separate URLs for each of the operation.I want to use Form Editing for this. Can anyone suggest me a sample code for this.
Thanks in advance, Abhishek
If you need to add form editing buttons on top of the grid you should use toppager:true
option of jqGrid. You don't need to define any other pager div and don't need to use pager
option. jqGrid creates a new div for the pager itself. The id of the pager div will be constructed from the id of the grid and the "_toppager"
suffix. For example if you use
<table id="grid"></table>
then the div of the pager will have the id="grid_toppager"
and you can use
$("#grid").jqGrid("navGrid", "#grid_toppager", {/*navGrid options*/},
{url: "yourEditUrl"}, {url: "yourAddUrl"}, {url: "yourDelUrl"});
I recommend you to read this and this old answers for additional information.