Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loadui "Loading" message not displaying when setting datatype option to a function #2

Closed
pmoriarity opened this issue May 14, 2009 · 2 comments

Comments

@pmoriarity
Copy link

I’m setting the datatype option to a “Function” as described here:
http://www.secondpersonplural.ca/jqgriddocs/_2hj0xhk8b.htm

I have loadui “enabled”.

The “loading” message is not being displayed.

It looks like the problem is here (grid.base.js, line: 936)

if ($.isFunction(ts.p.datatype)) {
ts.p.datatype(gdata);
endReq(); // !!! This line seems to cause the problem !!!
}

@tonytomov
Copy link
Owner

Hello,
I do not think that this is a problem or bug. This is in the fact standart behaviour.
Let me explain. Before you call your own datatype function a beginReq function is called, which opened the loading message and othe things.
Usually the endReq function is called at end of the ajax request in complete function.
In your case this function is not called at end of your request, but immediatley after you call your function, so the loading message is closed immediatley and you can not see it.

So I will do the following. I will not call beginRequest when we have datatype as function (endReq too), bu will pass a additional parameter to the datatype function the unique id of the loading message, where you can easy show and hide them.
Thanks. Make the decision until write you

Regards
Tony

@pmoriarity
Copy link
Author

Tony,
That sounds reasonable. I'm new to this, how do I obtain this change?

Thanks,
Patrick

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants