Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
jqGrid Remove Extra Parameters Attached to Delete Url
01/08/2013
20:41
Avatar
pyraego
New Member
Members
Forum Posts: 2
Member Since:
01/08/2013
sp_UserOfflineSmall Offline

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>
02/08/2013
12:13
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Use serializeDelData to return parameter what you want.

Look here

Regards

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.

02/08/2013
21:45
Avatar
pyraego
New Member
Members
Forum Posts: 2
Member Since:
01/08/2013
sp_UserOfflineSmall Offline

Works perfect! Thank you

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
38 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information