我在做什么错在这里? 我应该有一个loadText,我有一个,我把我的loadui以“块”。 地球上还有什么我是做错了什么?
这些数据被加载有reloadGrid命令...也许我应该再设置loadText和负载的用户界面? 这是我如何设置我的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;
}
});
})
谢谢。 UPDATE:没了......这不工作
更新:下面是如何更新我的表
$("#list").setGridParam({
datatype: 'jsonstring',
datastr: result,
loadui: 'block',
loadtext: 'what is good in the hood?',
caption: 'Search Results'
}).trigger("reloadGrid");
PS ...的loadui,并loadtext不显示任何东西......我最缺少的东西....