我在这里做错了什么?我应该有一个 loadText,我有一个,我将 loadui 设置为“阻止”。我到底做错了什么...
该数据正在使用 reloadGrid 命令加载...也许我应该设置 loadText 并加载 ui 呢?这是我设置jqGrid的方式...
$(document).ready(function () {
$("#list").jqGrid({
shrinkToFit: false,
autowidth: true,
datatype: 'jsonstring',
mtype: 'POST',
colNames: [
'Last Name',
'First Name',
'DOB',
'Gender',
'EMPIID',
'MedipacId',
'EPCID'
],
colModel: [
{ name: 'Last_Name', width: 115, align: 'left' },
{ name: 'First_Name', width: 115, align: 'left' },
{ name: 'DOB', width: 115, align: 'left' },
{ name: 'GENDER', width: 115, align: 'left' },
{ name: 'EMPIID', width: 115, align: 'left' },
{ name: 'medipacId', width: 145, align: 'left' },
{ name: 'EPCID', width: 145, align: 'left' }
],
rowNum: 10,
rowList: [5, 10, 20, 50],
sortname: 'Id',
sortorder: "desc",
loadui: 'block',
loadtext: 'Does this thing every work?',
viewrecords: true,
imgpath: '/Content/themes/UPMC-theme/images',
caption: 'Patient Return Result',
ondblClickRow: function (id) {
var rowData = $("#list").getRowData(id);
var dummyURL = '@Url.Action("EditEncounter", "EditEncounterAdd", new { FirstName ="-1", LastName="-2", DOB = "-3", MRN="-4", popID = TempData["POPULATIONID"] })';
var FName = rowData['First_Name'];
var LName = rowData['Last_Name'];
var DOB = rowData['DOB'];
var MRN = rowData['medipacId'];
var path = dummyURL.replace("-1", FName);
var path = dummyURL.replace("-2", LName);
var path = dummyURL.replace("-3", DOB);
var path = dummyURL.replace("-4", MRN);
debugger;
document.location.href = path;
}
});
})
谢谢。 更新:不……那行不通
更新:以下是我更新表格的方式
$("#list").setGridParam({
datatype: 'jsonstring',
datastr: result,
loadui: 'block',
loadtext: 'what is good in the hood?',
caption: 'Search Results'
}).trigger("reloadGrid");
ps ...... loadui 和 loadtext 根本没有显示任何东西......我最想念的东西......