我想删除jqgrid中的记录但是我收到错误:
执行删除时错误状态:'内部服务器错误'。错误代码:500
。我想从数据库中删除一条记录。请告诉我哪里出错了。我的代码是:
<form id="form1" runat="server">
<div style="display:table">
<div style="display:table-row">
</div>
<div style="display:table-row">
<div id="divSurvey"></div>
<table id="tableSurvey"></table>
<button type="button" ID="btnedit" value="Submit" runat="server">Submit</button>
<script type="text/javascript">
$(document).ready(function(){
jQuery("#tableSurvey").jqGrid
({
url :'FetchGridDetails.aspx',
datatype :'json', // data which will be filled
mtype :"GET",
postData :{Fill: function(){return 'Survey'}},
contentType :"application/json; charset=utf-8",
jsonReader :
{
root:"rows",
page:"page",
total:"total",
records:"records",
repeatitems:false
},
colNames : //Define column Names
[
'SurveyID',
'EnquiryID',
'AccountID',
'AccountType',
'SurveyType',
'BranchID',
],
colModel:
[
{
name :'SurveyID',
index :'SurveyID',
align :'center',
width :150,
key :true,
editoptions:{ readonly:true }
},
{
name :'AccountID',
index :'AccountID',
align :"center",
width :150,
editable:true
},
{
name :'SurveyType',
index :'SurveyType',
align :"center",
width :150,
editable:true
},
],
rowNum :8,
rowList :[10,20,30],
pager :'#divSurvey', // id of div tag...(Pager)
sortname :'SurveyID',
sortorder :"desc",
viewrecords :true,
emptyrecords :"No RECORDS FOUND",
loadonce :true,
editurl :'EditGridDetails.aspx', //code for delete
width :'500px',
multiselect :true,
shrinkToFit :true,
forceFit :true,
sortable :true,
autowidth :false,
height :"100%",
width :"100%",
ignoreCase :true,
gridview :true,
pageable :true,
serverPaging :true,
modal :true,
scrollable :false,
caption :"Survey Details"
}).jqGrid
(
'navGrid',
'#divSurvey',
{
edit :false,
add :false,
del :true,
search :false,
view :false
}
);
});
</script>