Forum
Okay so I am trying to add delete / update / add functionality to my grid. The current issue is when I click submit in the delete confirm popup the Url has extra parameters that I don't want.
Ex: xxx.xxx/product/DeleteProduct?productId=&oper=del&id=2000
I want it to look like: xxx.xxx/product/DeleteProduct?productId=2000
How do I remove the "&oper=del&id=".
Thanks for any help. Code below.
<script type="text/javascript"> $(document).ready(function () { jQuery("#productTable").jqGrid({ url: 'xxx.xxx/product/GetAllProducts', mtype: 'GET', datatype: 'json', height: 250, width: 900, pgbuttons: false, pgtext: null, viewrecords: false, rowList: [], rowNum:-1, pager: '#productPager', viewrecords: true, colNames: ['Id', 'Active', 'Description', 'Features', 'Name', 'Specification', 'ThumbNail', 'View Image', 'Solution Id', 'Search Type', 'Section', 'Section Search'], colModel: [ { name: 'Id', index: 'Id', width: 60, sortable: false,align:"center", editable: false }, { name: 'active', index: 'active', width: 90, sortable: false, align:"center", editable: true }, { name: 'description', index: 'description', width: 90, sortable: false, editable: true }, { name: 'features', index: 'features', width: 100, sortable: false, editable: true }, { name: 'name', index: 'name', width: 80, sortable: false, editable: true }, { name: 'specification', index: 'specification', width: 100, height:40, sortable: false, editable: true, edittype:'textarea',editoptions: { rows:'3',cols:'20', dataInit: function (domElem) { $(domElem).addClass("editable"); }}}, { name: 'thumbNail', index: 'thumbNail', width: 100, sortable: false, editable: true }, { name: 'viewImage', index: 'viewImage', width: 100, sortable: false, editable: true }, { name: 'SolutionId', index: 'SolutionId', width: 100, sortable: false, align:"center", editable: true }, { name: 'searchType', index: 'searchType', width: 100, sortable: false, align:"center", editable: true }, { name: 'section', index: 'section', width: 100, sortable: false, align:"center", editable: true }, { name: 'sectionSearch', index: 'sectionSearch', width: 100, sortable: false, align:"center", editable: true }, ], jsonReader: { root: 'resultObject', id: 'Id', repeatitems: false, page: function (obj) { return 1; }, total: function (obj) { return 1; }, records: function (obj) { return obj.resultObject.length } }, }); jQuery("#productTable").jqGrid('navGrid', '#productPager', { edit: false, add: false, del: true, search: false, refresh: false }, // Edit options {}, // Add options {}, //del options { mtype: 'GET', url: 'xxx.xxx/product/DeleteProduct?productId=', onclickSubmit: function (postdata) { alert('in onclickSubmit: postdata=' + postdata); return {}; }, reloadAfterSubmit: true, closeOnEscape: true, bottominfo: "Fields marked with (*) are required." } ); }); </script> <table id="productTable"></table> <div id="productPager"></div> </div>
12:13
Moderators
30/10/2007
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
51 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66