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
Adding JSONP support
10/09/2009
04:28
Avatar
fairsayan
Member
Members
Forum Posts: 7
Member Since:
24/07/2009
sp_UserOfflineSmall Offline

I'd like to have JSONP dataType. I could use “function” dataType, but I wondering an easier way to manage it. I added in grid.base.js this code:

                case “jsonp”:
                    $.ajax({url:ts.p.url,type:ts.p.mtype,dataType:”jsonp”,data: gdata,
                        success:function(JSON,st) {
                            addJSONData(JSON,ts.grid.bDiv,rcnt);
                            JSON=null;
                            if(loadComplete) {loadComplete();}
                        },
                        error:function(xhr,st,err){if(loadError) {loadError(xhr,st,err);}endReq();}, beforeSend: function(xhr){if(loadBeforeSend) {loadBeforeSend(xhr);}}});
                    if( ts.p.loadonce || ts.p.treeGrid) {ts.p.datatype = “local”;}
                break;

Since you add “callback=?” to your data URL as required by jQuery, it works well in retriveing data, but delete and update commands don't work yet.

Fair

10/09/2009
04:37
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

It is already added. Download 3.5.3 lelease

http://www.trirand.com/jqgridw....._and_fixes

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.

10/09/2009
05:04
Avatar
fairsayan
Member
Members
Forum Posts: 7
Member Since:
24/07/2009
sp_UserOfflineSmall Offline

Thanks a lot!

Fair

26/03/2011
00:21
Avatar
ragarw10
New Jersey
New Member
Members
Forum Posts: 2
Member Since:
26/03/2011
sp_UserOfflineSmall Offline

Hi Folks,

Getting blank cells when trying to use the grid with jsonp…is anyone else having this issue? All I did was change my datatype to jsonp and returned jsonp from the mvc controller. According to fiddler the data is coming back…but I cant see it in the grid.What am I doing wrong?

Thanks for any help,

Rahul

26/03/2011
01:16
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Rahul!

I am not sure that it is the jqGrid issue. Can be you use IE9 for your tests? Some time ago I prepared http://www.ok-soft-gmbh.com/jq.....tables.htm was blocked due to mime type mismatch 

On the other side the HTTP headers of the server response seems me OK (I mean the new security issues described here).

Do you have the same problem? Try to use you grid in another web browser.

In all situations posting such kind of information without the source code and without detaild description of the test scenario is not good.

Best regards
Oleg 

29/03/2011
18:33
Avatar
ragarw10
New Jersey
New Member
Members
Forum Posts: 2
Member Since:
26/03/2011
sp_UserOfflineSmall Offline

Hi Oleg,

Thanks , the sample really helped. I was not returning data correctly to the grid. I didnt have '&jsonCallback=?' appended to the url and was using jsonp as the datatype so it was appending 'callback'. This was causing me not to have the callback method in the returned data.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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