Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Loading Text Not Displaying JqGrid 3.6.2
26/02/2010
15:36
Avatar
JJslim
Member
Members
Forum Posts: 9
Member Since:
25/02/2010
sp_UserOfflineSmall Offline

For some reason the loading text does not display when the grid loads its data. Any ideas?

Thanks,

Jarrod

01/03/2010
20:59
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

02/03/2010
21:40
Avatar
JJslim
Member
Members
Forum Posts: 9
Member Since:
25/02/2010
sp_UserOfflineSmall Offline

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.

grid.jqGrid({
        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'
    });
04/03/2010
20:45
Avatar
JJslim
Member
Members
Forum Posts: 9
Member Since:
25/02/2010
sp_UserOfflineSmall Offline

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;
    }
}

30/04/2014
15:21
Avatar
pushpendraJaiswal
India
New Member
Members
Forum Posts: 2
Member Since:
30/04/2014
sp_UserOfflineSmall Offline

ConfusedJJslim 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

30/04/2014
15:21
Avatar
pushpendraJaiswal
India
New Member
Members
Forum Posts: 2
Member Since:
30/04/2014
sp_UserOfflineSmall Offline

ConfusedJJslim 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

04/05/2014
10:17
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information