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
Potential Bug with jgGridExport and PostData Grid Parameter
23/02/2010
19:36
Avatar
billy
Member
Members
Forum Posts: 11
Member Since:
27/11/2008
sp_UserOfflineSmall Offline

Hi,

I am using the jqGridExport/Import functions and have come across a potential bug when using  postdata with setGridParam.

If I do a search with the grid and then hit the default reset/reload button on the pager, and then export my grid I get non-valid json in the form of:

...

"postData":{
            "_search":false,
            "nd":1266945818052,
            "rows":5000,
            "page":1,
            "sidx":"BLDRM",
            "sord":"asc",
            "filters":"
        },

...

as you can see there appears to be an unescaped quote for filters

BUT if i create my own reset button using the code below:

jQuery("#showBuildings").setGridParam(
                {
                    postData:
                    {
                        serialString : "status=1",
                        filters:null
                    },
                    page:1,
                    search:false
                }
            ).trigger("reloadGrid");

I am able to get the export to function as expected:

...

"postData":{
            "_search":false,
            "nd":1266945392829,
            "rows":5000,
            "page":1,
            "sidx":"BLDRM",
            "sord":"asc",
            "filters":null,
            "serialString":"status=1"
        },

...

Any attempt to use filter:'' or filter:"" will cause the export to produce invalid json, only null seems to produce valid results.

does this seem like a bug to you?

thanks

billy

24/02/2010
19:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I do not know which version do you use, but it is fixed in 3.6.4

http://github.com/tonytomov/jq.....8c8400b447

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.

25/02/2010
15:28
Avatar
billy
Member
Members
Forum Posts: 11
Member Since:
27/11/2008
sp_UserOfflineSmall Offline

thanks!

05/03/2010
00:10
Avatar
genny
Member
Members
Forum Posts: 4
Member Since:
04/03/2010
sp_UserOfflineSmall Offline

Hello,

I'm using the 3.6.4 version of the jqGrid and also need to do exports of grid config, store it, and then reimport it at some later point.

The bug was fixed for the export, but when importing, the filter does not come right, the url takes the filter as [Object+object].

I had to quote the whole filters json string in single quotes at lines 163 to 166

if(gprm.postData.filters != undefined) {
   ret=ret.replace(/filters":"/,'filters":\'');
   ret=ret.replace(/}]}"/,"}]}'");
}

Hope this helps!

Genny

05/03/2010
11:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks for this. Yes we have tested the export, but not import.

Also will be fixed.

Thnaks again

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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