Note that there are some explanatory texts on larger screens.

plurals
  1. POImplementing Delete and Edit operations in jqgrid
    primarykey
    data
    text
    <p>i have the following JQgrid implementation</p> <pre><code> colModel: [ { name: 'NameEn', index: 'NameEn', width: 100, align: 'left' }, { name: 'Desc', index: 'Desc', width: 100, align: 'left' }, { name: 'ID', index: 'ID', width: 100, align: 'left', hidden:true } ], caption: "Management", gridview: true, rownumbers: true, rownumWidth: 40, scroll: 0, rowNum: 100, sortname: 'ID', pager: '#pager', sortorder: "asc", viewrecords: true, autowidth: true, width: '100%', height: '100%', jsonReader: { root: "GridData", page: "CurrentPage", total: "TotalPages", records: "TotalRecords", repeatitems: false, id: "00" } }; SectorGrid.prototype.SetupGrid = function (selector) { jQuery(selector).html('&lt;table id="grid"&gt;&lt;/table&gt;&lt;div id="pager"&gt;&lt;/div&gt;'); var grid = jQuery("#grid").jqGrid(this.gridConfiguration); jQuery("#grid").navGrid('#pager',{edit:false,add:false,del:true,search:false}) }; </code></pre> <p>i want to add a delete functionality, the delete call a webservice with the url <a href="http://localhost/services.svc/sector(id" rel="nofollow">http://localhost/services.svc/sector(id</a>) and the service just take the id and it will handle everything by it self also i would like to edit data using differnt url <a href="http://localhost/services.svc/sector" rel="nofollow">http://localhost/services.svc/sector</a> and this receives json object with the same information above. i really tried to configure it but it wont work can somebody help me in this, it dosent matter if u used the delete option in the jqgrid or custom buttons but i dont want to use the editurl property.</p> <p>please put a full example how to implement this continue to my code above</p> <p><strong>UPDATED</strong>: Rest Method</p> <pre><code>[WebInvoke(UriTemplate = "Sector({iD})/", Method = "DELETE", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] [OperationContract] bool DeleteSector(string iD) </code></pre> <p>thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload