Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






bugs in addRowData, delRowData and setRowData if idPrefix is defined and the data are local

UserPost

15:10
19/03/2012


OlegK

Germany

Member

posts 1210

Hello Tony,

during answering on the answer I found some bugs in addRowData, delRowData and setRowData functions in case of usage of idPrefix option and datatype: 'local'. The functions delRowData and setRowData contain the line

var pos = $t.p._index[rowid];

(see here and here) which should be fixed to

var id = $.jgrid.stripPref($t.p.idPrefix, rowid), pos = $t.p._index[id];

In the same way in the addRowData there are the lines

lcdata[t.p.localReader.id] = rowid;
t.p._index[rowid] = t.p.data.length; 

which should use non-prefixed id. So I suggest to define in the line aditional variable id, insert before the line

rowid = t.p.idPrefix + rowid;

the statement

id = rowid; // pure id without prefix

and modify the lines to

lcdata[t.p.localReader.id] = id;
t.p._index[id] = t.p.data.length;

Best regards
Oleg

P.S. Tony, some time before I posted some other bug reports with my suggestion how to fix the problems: see here, here and here (I still think that the usage of 'u' as the total number of mileseconds since Unix Epoch is wrong. The value of 'u' should be integer between 0 and 999 and can be used as the part of "Y-m-d H:i:s.u" format). Additionally you still not answered on my suggestion to make columnChooser really resizable. Some small parts of the code are included in the main code of jqGrid, but not the main part or resizing. Please answer on the bug reports.


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

215


Currently Online:

97 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 10277

Posts: 30372

Membership:

There are 11043 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1210

markw65 – 179

kobruleht – 144

phicarre – 132

YamilBracho – 124

Renso – 118

Administrators: admin (60 Posts)

Moderators: tony (7387 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information