私のコードは grid の下にあります。多くの可能性を試してみました.すべての応答と提案は大歓迎です.ありがとう
var options = {
url:inboxGridUrl,
datatype: 'json',
mtype: 'GET',
colNames:['EvaluationId','Policy', 'Task','Status','Condition','Due Date','Eff Date','Agency Name','Agency No','Producer Name','Producer No','Review Start','Location','Task Group'],
colModel :[
{name:'uwEvaluationId', label: 'EvaluationId',formatter:'integer',editable: true,hidden:true, frozen : true,editoptions: {disabled: true, size:5}},
{name:'policyNum',label: 'Policy',width: 125,editable: true,formatter:formatPolicyLink,editrules: {required: true}},
{name:'transactionType',label: 'Task',width: 40,editable: true,editrules: {required: true}},
{name:'uwDecision',label: 'Status',width: 50,editable: true,edittype: 'select',editrules: {edithidden:true},editoptions: {required: true}},
{name:'taskCondition',label: 'Condition',align: 'left',width: 60,editable: true,
editrules: {required: true, integer: true},editoptions: {size:5, maxlength: 4}},
{name:'dueDate',label: 'Due Date',align: 'left',width: 70,editable: true,edittype: 'select',editoptions: {required: true}},
{name:'policyEffectiveDate',label: 'Eff Date',width: 70,editable: true,edittype: 'select',editrules: {required: true}},
{name:'agencyName',label: 'Agency Name',editable: true,width: 120,edittype: 'select',editrules: {required: true}},
{name:'agentCode',label: 'Agency No.',editable: true,width: 75,edittype: 'select',editrules: {required: true}},
{name:'producerName',label: 'Producer Name',width: 120,editable: true,edittype: 'select',editrules: {required: true}},
{name:'producerCode',label: 'Producer No',width: 75,editable: true,edittype: 'select',editrules: {required: true}},
{name:'startDate',label: 'Review Start',width: 80,editable: true,edittype: 'select',editrules: {required: true}},
{name:'locationCd',label: 'Location',width: 70,editable: true,edittype: 'select',editrules: {required: true}},
{name:'groupName',label: 'Task Group',width: 75,editable: true,edittype: 'select',editrules: {required: true}},
],
prmNames: {rows: 'max', search: null},
rowNum:20000,
height: 'auto',
sortname: 'id',
sortable: true,
forceFit : true,
repeatitems:true,
sortorder: 'desc',
loadonce:true,
shrinktofit:true,
datatype: 'json',
recreateForm:true,
multipleGroup:true,
multipleSearch:true,
multiselect: true,
gridview: true,
hidegrid: false,
viewrecords: true,
gridview: true,
refreshtitle: "Reload Tasks",
caption: 'Inbox',
//code to display sort icons on load
onSortCol: function (index, idxcol, sortorder) {
if (this.p.lastsort >= 0 && this.p.lastsort !== idxcol && this.p.colModel[this.p.lastsort].sortable !== false) {
$(this.grid.headers[this.p.lastsort].el).find(">div.ui-jqgrid-sortable>span.s-ico").show();
}
},
loadComplete: function() {
rowCount = $("#taskList").getGridParam("records");
if (rowCount > 0){
$("#warningMessage").html("");
$("#warningBlock").hide();
$("#recordsCount").html(rowCount);
$("#messageBlock").show();
} else if (rowCount <= 0) {
$("#messageBlock").hide();
$("#warningMessage").html("No Tasks Found");
$("#warningBlock").show();
}
},
ignoreCase: true,
jsonReader : {
root: "rows",
page: "page",
total: "total",
records: "records",
repeatitems: false,
cell: "cell",
id: "uwEvaluationId"
} ,
postData: {filters: {groupOp: "AND", rules: [{field: "policyNum", op: "bw", data: "h" }]}}
};
$("#taskList").jqGrid(options);
$("#taskList").jqGrid('navGrid','#pager',{edit:false,add:false,del:false,search:false,refresh:true});
$("#taskList").jqGrid('filterToolbar', {stringReuslt:true, searchOnEnter:false, defaultSearch:"cn", autoSearch:true
});