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
custom ajax options
07/02/2010
11:30
Avatar
speedpacket
Member
Members
Forum Posts: 4
Member Since:
07/02/2010
sp_UserOfflineSmall Offline

Hello,

All of our data is from the server is returned in a standard json object, meaning that next to the data your grid requires, each ajax call will in fact contain additional data such as error messages and other generic stuff...

Normally, we can use the $.ajaxSettings option to add a dataFilter function, and have all AJAX request results been pre-processed before returning to the actual caller (bring your grid), but for some reason ajax calls that are made by your grid do not go through this datafilter function.

Any idea?

10/02/2010
15:40
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

How you do that?

If there is no code how can I determine somthing? The best will be if you provide a link to the problem

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.

11/02/2010
18:30
Avatar
speedpacket
Member
Members
Forum Posts: 4
Member Since:
07/02/2010
sp_UserOfflineSmall Offline

Hi,

My apologies for not being cleared.

The ajaxSetup method allows me to set default options for all future AJAX requests. 

I specified the following bit of code in my header:

jQuery(document).ready(function(){
    // Set default AJAX options...
    jQuery.ajaxSetup({
        datafilter: function(data, dataType) {
            console.log("Pre-processing data...");
            return data;
        }
    }

});

This means that all ajax requests performed after the setup was run, should use the settings I provided to the ajaxSetup function.

In this case, I set the datafilter option.  Whenever this is set, jQuery is supposed to do the following when an ajax call is being performed (by your grid for instance):

1. Send request to the server

2. Send the result from the server to the datafilter function

3. Send the result from the datafilter function to ajaxComplete function (where you are probably updating your grid...)

What I would expect using the above piece of code in combination with your grid, is that each time your grid goes to the server, I would see a log message in the firebug console.  At this time, however, I don't see my tests come through, and it appeas that for some reason any request made by your grid is not being passed through this datafilter function...

13/02/2010
14:53
Avatar
speedpacket
Member
Members
Forum Posts: 4
Member Since:
07/02/2010
sp_UserOfflineSmall Offline

Hi,

My apologies for bumping this post.  Is there any chance we can get paid support for the grid?  I know you offer it for the PHP and ASP option, but we just need the javascript (php is all fine...), but would love to be able to rely on support from you guys if that would be possible.

Don't understand me wrong - I don't want you to post an immediate response here, but if we could get something as paid support, it's easier for me to sell your grid internally as something we can use longterm...

This current thread is a showstopper for us, so if you might have a look, it would be MUCH appreciated!!!

David.

17/02/2010
12:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

There is menu support on this page. You can look to the end of this.

As I can see - is this your typo?

I think it should be dataFilter(data, type) and not datafilter(data, type)

Also which version of jQuery is used?

Try to specify dataFilter in ajaxGridOptions

Please let me known if this work.

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

17/02/2010
12:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

So not updated. Just to mark it

Sorry

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.

17/02/2010
14:54
Avatar
speedpacket
Member
Members
Forum Posts: 4
Member Since:
07/02/2010
sp_UserOfflineSmall Offline

Tony,

That type did indeed cost me two weeks of work!!!

thanks so much for pointing me out; I usually check for typos as my first attempt of resolving issues, so this is a lifesaver!!!!

david.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
78 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