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_Related Related Topics sp_TopicIcon
Drag and Drop record count issue
28/01/2011
05:35
Avatar
kalinwilson
Member
Members
Forum Posts: 4
Member Since:
23/09/2010
sp_UserOfflineSmall Offline

I've come across a couple of bugs/issues. I'll post each in a separate post.

I'm using two grids to act as a multi-select control. The first grid is populated with local data resulting from an ajax query to the server. The rows from this grid can be dragged to a second grid which represents the selections.

Both grids have a footer row which displays the number of records in the grid. The footer is updated in the ondrop events and when the candidate grid is initially populated.

Here is the code for updateFooters():

function updateFooters(){

  var numCRecords = jQuery("#candidateList").jqGrid('getGridParam', 'reccount');

  var numSRecords = jQuery("#selectedList").jqGrid('getGridParam', 'reccount');

  jQuery("#candidateList").jqGrid('footerData', 'set', {name:numCRecords + ' candidates'}, true);

  jQuery("#selectedList").jqGrid('footerData', 'set', {name:numSRecords + ' candidates'}, true);

}

When the candidate list is initialized and the selected list is empty, the record counts are correct. When the first row is dragged to the selected list, the record count of the selected list is 2. When the next row is dragged to the selected list, the count remains 2 and is correct for subsequent additions or subtractions from the grid. My guess is the initial ghost row that acts as the drop target is retained after the first drop and throws off the count. That's a wild guess since I haven't dug into the code.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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