问题
What am I doing wrong here? I am supposed to have a loadText, and I have one, I set my loadui to 'block'. What on earth could I be doing wrong...
That data is being loaded with a reloadGrid command... Maybe I should be setting the loadText and load ui then? Here is how I set up my 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;
}
});
})
Thanks. UPDATE: Nope... That doesn't work
UPDATE: THE FOLLOWING IS HOW I UPDATE MY TABLE
$("#list").setGridParam({
datatype: 'jsonstring',
datastr: result,
loadui: 'block',
loadtext: 'what is good in the hood?',
caption: 'Search Results'
}).trigger("reloadGrid");
ps... the loadui, and loadtext do not show anything at all... I most be missing something....
回答1:
The first thing that comes to mind is that there is no url
option, so the grid does not know where to load data from... or am I missing something?
来源:https://stackoverflow.com/questions/11650103/jqgrid-loading-message-wont-work