Forum

November 2nd, 2014
A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS Related Topics
bugs in addRowData, delRowData and setRowData if idPrefix is defined and the data are local
19/03/2012
15:10
OlegK
Germany
Member
Forum Posts: 1245
Member Since:
10/08/2009
Offline

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 215

Currently Online:
47 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1245

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11355

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10561

Posts: 31233

Newest Members: CesarTP, Carlos Escario Bajo, ashish_sahu, saroj sasamal, jqgsun, ni

Moderators: tony: 7720, Rumen[Trirand]: 81

Administrators: admin: 61

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information