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
exception after successful delete in complete event handler
17/12/2011
20:58
Avatar
kobruleht
Member
Members
Forum Posts: 144
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

If row is deleted using call to server, exception

Object doen't support property or method split

occurs in delete complete handler in jquery.jqGrid.src.js file near line 8273
 

         toarr = postdata.split(",");

 postdata is already array parsed already near line 8239

postdata = postdata.split(",");

and thus it does not contain split method.

Replacing this line with

toarr = postdata;

fixes it.

How about fixing this ?

20/12/2011
13:23
Avatar
kobruleht
Member
Members
Forum Posts: 144
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

I added push request for this issue. One line fix but after editing with visual studio formatting also was changed

https://github.com/kobruleht/jqGrid/commit/3bbb6d8f0285aec0cb45fd7b2e98b6cdccddc645

20/12/2011
15:45
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

I think that the origin of the described bug is the line 1542:

postdata = postdata.split(",");

which modifys the postdata. The postdata variable will be used later not only the the line 1577 

toarr = postdata.split(",");

which you suggest to fix, but also in the line 1589

setTimeout(function(){rp_ge[$t.p.id].afterComplete(data,postdata);},500);

as the parameter of the afterComplete callback function. In the version 4.1.2 and earlier the postdata was unchanged. First in the version 4.2.0 (see here) the problem appears. It was in the long change.

So I suggest to replace the lines 1542-1548

postdata = postdata.split(",");
for( var pk in postdata) {
    if(postdata.hasOwnProperty(pk)) {
        postdata[pk] = $.jgrid.stripPref($t.p.idPrefix, postdata[pk]);
    }
}
postd[idname] = postdata.join(); 

to the following

var pdArray = postdata.split(","), j;
for (j=0; j<pdArray.length; j++) {
    pdArray[j] = $.jgrid.stripPref($t.p.idPrefix, postdata[j]);
}
postd[idname] = pdArray.join(); 

Best regards
Oleg

P.S. The modified version of jquery.jqGrid.src.js (for testing of the fix) you can get here.

23/12/2011
15:10
Avatar
kobruleht
Member
Members
Forum Posts: 144
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

I tried  

http://www.ok-soft-gmbh.com/jq.....-delete.js

using remote json data, row id is passed separately for every row like

{"total":18,"page":1,"records":851,"rows":[{"id":"444444","cell":[null,"444444","0,00000","","0,00","","0,00000","","","20","501","","","",""]},{"id":"_2EPUIT","cell":[null,".PUIT","0,00000","Taara","0,00","Puitpakend","0,00000","","","","","","TAARA","",""]},{"id":"ERWEWERT","cell":[null,"ERWEWERT","0,00000","","0,00","","0,00000","","","20","501","","","",""]},{"id":"_2EMKLAASO","cell":[null,".MKLAASO","0,00000","Taara","0,00","Roheline ja muu klaaspakend","0,00000","","","","501","","TAARA","",""]},{"id":"_2EPABER","cell":[null,".PABER","0,00000","Taara","0,00","Paber ja papppakenddddd","0,00000","","","","111","","TAARA","",""]},{"id":"KROONID","cell":[null,"KROONID","0,00000","","0,00","","0,00000","","","20","501","","","",""]},{"id":"002","cell":[null,"002","0,01667","Toodang","0,02","Kiiver roheline","0,25565","kott","Asel AS","20","501","tere","TOODANG","kott","37"]},{"id":"003","cell":[null,"003","0,02000","Kaup","0

jqGrid passes only first character from row id to Delete controller so it looks like it is not usable.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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