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
gridImport
09/12/2013
11:17
Avatar
Secret
Member
Members
Forum Posts: 4
Member Since:
09/12/2013
sp_UserOfflineSmall Offline

i am trying import grid params. Before this,i exporting grid paramtrs:

 exp=grid.jqGridExport({exptype:"jsonstring"});

and Import

grid.jqGrid('jqGridImport',{imptype:"jsonstring", impstring:exp,importComplete: function() {grid.trigger('reloadGrid');console.log('something');}});

but nothing,even:

grid.jqGrid('GridUnload').jqGrid('jqGridImport',{imptype:"jsonstring", impstring:exp,importComplete: function() {grid.trigger('reloadGrid');console.log('something');}});

not work;

version:

jqGrid  4.5.4 - jQuery Grid
jquery: 1.7.2
what i am doing wrong???
09/12/2013
11:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Can you please zip your final jsonstring ( which does not work) and send it to me to test it.

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.

09/12/2013
12:20
Avatar
Secret
Member
Members
Forum Posts: 4
Member Since:
09/12/2013
sp_UserOfflineSmall Offline

I send you archive, thank you for help

10/12/2013
12:33
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

1. The file is not in UTF-8 encoded - not sure if this is the problem, but when I opened in the exported json string there was a syntax error in onselectCell function. Please check this.

Try not to use them in the export string and see if this is 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.

10/12/2013
14:39
Avatar
Secret
Member
Members
Forum Posts: 4
Member Since:
09/12/2013
sp_UserOfflineSmall Offline

Hi! This is my example http://sergeybri.zz.mu/index.html/ On "plus" button export grid in variable (see in console), On "edit" button export. Nothing.

Delete onCellSelected and others not needed properties and functions

14/12/2013
18:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

The problem you have is that you try to create the new grid on existing grid.

That is: the grid can not be recreated again if it is created.

Possible solution (tested):

Use GridDestroy to remove the old grid or just remove the old grid.

Create new table element and apply the gridImport to it.

Enjoy

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.

15/12/2013
00:10
Avatar
Secret
Member
Members
Forum Posts: 4
Member Since:
09/12/2013
sp_UserOfflineSmall Offline

Yes it's works, but how about filters and navGrid. This parameter not importing. What we can do that importing those parameters?

17/12/2013
11:12
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Navigator options including filters are not part of the grid. You will neeed to create your own jsonstring. See the code for exportGrid (it uses a very simple code) or use importComplete to build the navigator when  you impoprt the grid.

Refer to the documentation.

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:
66 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