Forum
05:35
23/09/2010
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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66