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
header/column not match after jqGridExport
18/03/2010
00:11
Avatar
JonL
Member
Members
Forum Posts: 4
Member Since:
16/03/2010
sp_UserOfflineSmall Offline

After I called jqGridExport, the DND header does not match up with the data if I drag the header.  Is this a bug or there's a work around for this?

here's my function:

$(

"#ExportMe").click(function() {

var s;

s = jQuery(

"#list1").jqGrid('jqGridExport', { exptype: 'xmlstring', root: 'grid', ident: '\t' });

});

18/03/2010
11:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Which version is used?

Try with the latest one.

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.

18/03/2010
17:21
Avatar
JonL
Member
Members
Forum Posts: 4
Member Since:
16/03/2010
sp_UserOfflineSmall Offline

I am currently using jqGrid 3.6.4.

I tried to download all the files again but it still the same.

Here are the js files I am using:

jquery-1.3.2.min.js

i18n/grid.locale-en.js

jquery-ui-1.7.2.custom.min.js

jquery.jqGrid.min.js

18/03/2010
23:08
Avatar
JonL
Member
Members
Forum Posts: 4
Member Since:
16/03/2010
sp_UserOfflineSmall Offline

I found out the cause for the header/column not match.

I have multiselect: true, which when I called jqGridExport

the actual colModel and colName was splice also. I highlight the code in purple.

Is there a way to duplicate the object  instead of using the actual object?

jqGridExport: function(a){

a = b.extend({ exptype:

"xmlstring", root: "grid", ident: "\t" }, a || {}); var e = null; this.each(function() {

if (this.grid) {

var c = b.extend({}, b(this).jqGrid("getGridParam"));

if (c.rownumbers) { c.colNames.splice(0, 1); c.colModel.splice(0, 1) }

 if (c.multiselect) {

c.colNames.splice(0, 1); c.colModel.splice(0, 1)

}

if (c.subgrid) {

c.colNames.splice(0,1); c.colModel.splice(0, 1)

}

if (c.treeGrid) for (var j in c.treeReader) { c.colNames.splice(c.colNames.length - 1); c.colModel.splice(c.colModel.length - 1) } switch (a.exptype) { case "xmlstring": e = "<" + a.root + ">" + xmlJsonClass.json2xml(c, a.ident) + "</" + a.root + ">"; break; case "jsonstring": e = "{" + xmlJsonClass.toJson(c, a.root, a.ident) + "}"; if (c.postData.filters != undefined) { e = e.replace(/filters":"/, 'filters":'); e = e.replace(/}]}"/, "}]}") } break }

}

});

return e

},

22/03/2010
11:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

This should not happen since of this,

var c = b.extend({}, b(this).jqGrid("getGridParam"));

but I will check it.

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.

05/05/2011
22:59
Avatar
EmpowerBoy
Asgard
New Member
Members
Forum Posts: 1
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

In order for it to work you should replace this:

var c = b.extend({}, b(this).jqGrid("getGridParam"));

With this:

var c = b.extend(true, {}, b(this).jqGrid("getGridParam"));

The difference is that the latter option makes a deep copy, instead of a shallow one.

May the power of the Ball-Of-Ham be with you...

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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