Forum
20:59
Moderators
30/10/2007
Hello,
As I again and again say - I do not have Idea when I do not say the code and a lot of additional information
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
21:40
25/02/2010
Appologies. Removed column info for brevity. Everything else in the grid functions great I just don't seem to get any loading indicator even thought the results comes back ok. We'll start with this code and if I need more then I can post. Thanks in advance.
datatype: getReports,
rowList: [20, 50, 100, 250],
rowNum: 20,
sortname: sortBy,
pager: $('#pageNavigation'),
sortorder: sortOrder,
width: 726,
shrinkToFit: false,
height: 477,
altRows: true,
loadui: "block",
loadtext: "Refreshing Grid",
postData: { businessGroupId: businessGroupId, reportQueueGroupId: queueGroupId },
emptyrecords: "No records to view",
viewrecords: true,
caption: 'Reports'
});
20:45
25/02/2010
After looking through the source I figured out the problem. Since I was using a custom function to fetch and add the data to the grid instead of using the grid's built in ajax functionality the loading text was not displaying. I ended up creating two methods, which I call when I start my ajax request and when it returnsm that do the same thing the built in ajax functionality does to show and hide the loading text. Here they are for anyone else who might be in the same boat.
var ts = $("#" + gridName + ".ui-jqgrid-btable")[0];
ts.grid.hDiv.loading = true;
if (ts.p.hiddengrid) { return; }
switch (ts.p.loadui) {
case "disable":
break;
case "enable":
$("#load_" + ts.p.id).show();
break;
case "block":
$("#lui_" + ts.p.id).show();
$("#load_" + ts.p.id).show();
break;
}
}
function endGridRequest(gridName) {
var ts = $("#" + gridName + ".ui-jqgrid-btable")[0];
ts.grid.hDiv.loading = false;
if (ts.p.hiddengrid) { return; }
switch (ts.p.loadui) {
case "disable":
break;
case "enable":
$("#load_" + ts.p.id).hide();
break;
case "block":
$("#lui_" + ts.p.id).hide();
$("#load_" + ts.p.id).hide();
break;
}
}
15:21
30/04/2014
JJslim said:
After looking through the source I figured out the problem. Since I was using a custom function to fetch and add the data to the grid instead of using the grid's built in ajax functionality the loading text was not displaying. I ended up creating two methods, which I call when I start my ajax request and when it returnsm that do the same thing the built in ajax functionality does to show and hide the loading text. Here they are for anyone else who might be in the same boat.
function beginGridRequest(gridName) {
var ts = $("#" + gridName + ".ui-jqgrid-btable")[0];
ts.grid.hDiv.loading = true;
if (ts.p.hiddengrid) { return; }
switch (ts.p.loadui) {
case "disable":
break;
case "enable":
$("#load_" + ts.p.id).show();
break;
case "block":
$("#lui_" + ts.p.id).show();
$("#load_" + ts.p.id).show();
break;
}
}function endGridRequest(gridName) {
var ts = $("#" + gridName + ".ui-jqgrid-btable")[0];
ts.grid.hDiv.loading = false;
if (ts.p.hiddengrid) { return; }
switch (ts.p.loadui) {
case "disable":
break;
case "enable":
$("#load_" + ts.p.id).hide();
break;
case "block":
$("#lui_" + ts.p.id).hide();
$("#load_" + ts.p.id).hide();
break;
}
}
Thanks man , you saved me ... although its not working for me but great help
Pushpendra Jaiswal
15:21
30/04/2014
JJslim said:
After looking through the source I figured out the problem. Since I was using a custom function to fetch and add the data to the grid instead of using the grid's built in ajax functionality the loading text was not displaying. I ended up creating two methods, which I call when I start my ajax request and when it returnsm that do the same thing the built in ajax functionality does to show and hide the loading text. Here they are for anyone else who might be in the same boat.
function beginGridRequest(gridName) {
var ts = $("#" + gridName + ".ui-jqgrid-btable")[0];
ts.grid.hDiv.loading = true;
if (ts.p.hiddengrid) { return; }
switch (ts.p.loadui) {
case "disable":
break;
case "enable":
$("#load_" + ts.p.id).show();
break;
case "block":
$("#lui_" + ts.p.id).show();
$("#load_" + ts.p.id).show();
break;
}
}function endGridRequest(gridName) {
var ts = $("#" + gridName + ".ui-jqgrid-btable")[0];
ts.grid.hDiv.loading = false;
if (ts.p.hiddengrid) { return; }
switch (ts.p.loadui) {
case "disable":
break;
case "enable":
$("#load_" + ts.p.id).hide();
break;
case "block":
$("#lui_" + ts.p.id).hide();
$("#load_" + ts.p.id).hide();
break;
}
}
Thanks man , you saved me ... although its not working for me but great help
Pushpendra Jaiswal
10:17
Moderators
30/10/2007
Hello,
It depends where and you use this.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
38 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66