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
jqGridExport and jqGridImport not working in latest versions
21/10/2011
05:45
Avatar
dmi
New Member
Members
Forum Posts: 1
Member Since:
21/10/2011
sp_UserOfflineSmall Offline

Hi,

I have been trying to get import and export working using version 4.x (4.2.0).

I have a very simple solution such as:

var exportedGrid;

...

exportedGrid = $("#grid").jqGrid('jqGridExport',{exptype:"xmlstring", root: 'grid'});
...

$("#grid").jqGrid('GridUnload');

$("#grid").jqGrid('jqGridImport',{imptype:"xmlstring", impstring: exportedGrid, xmlGrid: { config: 'grid', data: "" }, importComplete: function() {alert("Imported");}}).trigger("reloadGrid");

This works fine with version jqGrid 3.8.2.  If i do this with jqGrid 4.x versions, the import causes several javascript errors (unterminated string literals etc).

I use formatter functions for some columns and also have a function reference for the onSelectRow jqgrid property.

From what I can tell of the xml put into exportedGrid, it seems that it pulls in the whole function referenced by the formatter or onSelectRow properties - and any quotes used within the formatter / selectRow function break the xml / javascript (they are not escaped properly).

This is also an issue with the jsonstring input / output.

These threads also seems to be having the same issue as me:

http://stackoverflow.com/quest.....ot-working

http://www.trirand.com/blog/?p.....iguration/

Please let me know if you need to see any code / xml etc.  The issue is quite simple to reproduce though.

Thanks!

24/10/2011
20:18
Avatar
luismpcarvalho
Member
Members
Forum Posts: 3
Member Since:
24/10/2011
sp_UserOfflineSmall Offline

Hi,

I am working around the given example called "Import configuration from xml" using last version of jqgrid. My idea is to have an unique html file with the import function on it, and then generate a xml file with all the configuration/data on server side. This way i can generate dynamic tables without touching on html files. I dont know if this is the right way to do it, but for now i dont know other way to do that.

First thing i tried to have on my tables is "multiselect", so i put "<multiselect>true</multiselect>" on xml file. This results on one checkbox on the header of the table, and no checkboxes on the rows. Then i tried the example demo for "multiselect", my idea was to export the configuration and see if there is any other option that i forgot, but no luck with that.

Then i try jqGrid 3.8.2 version, and with the same xml as previous i got multiselect working very well :), so i think that is something wrong is this last version of jqgrid.

I wish to know if there is any place (doc maybe?) with all xml options for configuration of these tables.

Thank you

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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