elove

OnRowClick Issues in 3.3

Discussion created by elove on Feb 21, 2013
Latest reply on Mar 26, 2013 by elove
Hi,
I am upgrading my application from 3.2 to 3.3 and in the process noticed that my OnRowClickHandler function no longer works. When I click on a row in my dojo data grid, nothing happens. I can see the selected feature on the map, I just can't zoom to it anymore. I have my connection to the grid, dojo.connect(grid2, "onRowClick", onRowClickHandler); inside my init() function as well. Also, there are no errors showing up in Firebug which is making it hard to pinpoint the problem. Has anyone else come across this issue?
Any insight would be greatly appreciated!
 function onRowClickHandler(evt){ 
  console.log(searchType);
  if (searchType == 'City') {
   var clickedTaxLotId = grid2.getItem(evt.rowIndex).CITY; 
   var selectedTaxLot; 
   var highlightSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255,255,0,0.3])); 
   dojo.forEach(map.graphics.graphics,function(graphic){ 
     if((graphic.attributes) && graphic.attributes.CITY === clickedTaxLotId){ 
    selectedTaxLot = graphic; 
    graphic.setSymbol(highlightSymbol);
       return; 
     } 
        }); 
  
   if ( selectedTaxLot.geometry.declaredClass == 'esri.geometry.Point' ) {
          map.centerAndZoom(taxLotExtent, 14)
   var sp = map.toScreen(selectedTaxLot.geometry);
   map.infoWindow.show(selectedTaxLot.geometry, map.getInfoWindowAnchor(sp));
   } else {
   var taxLotExtent = selectedTaxLot.geometry.getExtent(); 
   var screenpoint = map.toScreen(selectedTaxLot.geometry.getExtent().getCenter());
   var mappoint = map.toMap(screenpoint);
   map.setExtent(taxLotExtent,true);
   }
     }
}

Outcomes