JQGrid Configuring various URLs to add, edit, delete

I want to add three buttons on top of the grid to add, edit, delete. And want to make calls for individual URLs for each operation. I want to use form editing for this. Can anyone suggest me some sample code for this.

Thanks in advance, Abhishek

+4
source share
1 answer

If you need to add form editing buttons on top of the grid, you should use the toppager:true option for jqGrid. You do not need to define any other pager div and you do not need to use the pager parameter. jqGrid creates a new div for the pager itself. The div pager identifier will be constructed from the grid identifier and the suffix "_toppager" . For example, if you use

 <table id="grid"></table> 

then the pager div will have id="grid_toppager" and you can use

 $("#grid").jqGrid("navGrid", "#grid_toppager", {/*navGrid options*/}, {url: "yourEditUrl"}, {url: "yourAddUrl"}, {url: "yourDelUrl"}); 

I recommend that you read this and this old answers for more information.

+5
source

All Articles