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
Bug in addRowData Method
10/12/2014
03:53
Avatar
greg.valainis@pa-tech.com
New Member
Members
Forum Posts: 1
Member Since:
09/12/2014
sp_UserOfflineSmall Offline

EDIT: bad at english and missing ';' after the 'sind = sind.rowIndex + addin' statement

I believe I have found a bug in the addRowData method.  The bug occurs when using the method with pos = "after" and a subgrid exists below the row you are attempting to insert after.  First off, when inserting 'row' the .join('') method is not used.  Second off, the 'sind' is incremented incorrectly.  In this case it should be incremented by two, but it is only incremented by one.  Here is a jsFiddle link to my code:

http://jsfiddle.net/mzrLeqqe/1/

Used jsFiddle since I didn't really try to make the code formatted in this post.  Below is a hard copy.

case 'after':
sind = $(t).jqGrid('getGridRowById', src);
if (sind) {
var addin = 1;
if ($(t.rows[sind.rowIndex + 1]).hasClass("ui-subgrid")) { $(t.rows[sind.rowIndex + 1]).after(row.join('')); addin++; }
else { $(sind).after(row.join('')); }
sind = sind.rowIndex + addin;
}
break;

Hope this helps.

I believe the version I was using version 4.6 when I discovered this, but it appeared version 4.7 did not have this fixed.

10/12/2014
12:19
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi Greg,

I created the pull request based on your bug report.

Best regards
Oleg

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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