A deselection event and a selection event are sent when a record already selected is double clicked for edit. The same happens when the record is in edit mode and the focus is changed to any edit control. In both cases selection events should not be sent as they trigger unnecessary updates in other sections of the screen. I modified a Feature Explorer sample to demonstrate the issue:
Code:
isc.ListGrid.create({ ID: "countryList", width:550, height:224, alternateRecordStyles:true, showAllRecords:true, cellHeight:22, dataSource: countryDS, selCount: 0, deselCount: 0, fields:[ {name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false}, {name:"countryName"}, {name:"continent"}, {name:"member_g8"}, {name:"population", formatCellValue:"isc.Format.toUSString(value);"}, {name:"independence"} ], autoFetchData: true, canEdit: true, editEvent: "doubleClick", modalEditing: true, selectionChanged: function(record, isSelected) { var ret = this.Super("selectionChanged", arguments); if( isSelected ) this.selCount += 1; else this.deselCount += 1; selLabel.setContents('Selections: ' + this.selCount + ', Deselections: ' + this.deselCount); return ret; } }) isc.Label.create({ ID: "selLabel", top: 225, contents: "selections ..." });
Comment