uifacilities

Help converting function to API version 3.8

Discussion created by uifacilities on Mar 27, 2014
Latest reply on Mar 27, 2014 by uifacilities
I haven't been able to get this function to run properly.  It works as expected in version 2.6, but I am at my wits end trying to get it working in 3.8.  Any help is greatly appreciated.

      //Zoom to the POINT when the user clicks a row
      function onRowClickHandler(evt){
        var clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID;
        var selectedTaxLot;
        dojo.forEach(map.graphics.graphics,function(graphic){
          if((graphic.attributes) && graphic.attributes.OBJECTID === clickedTaxLotId){
            selectedTaxLot = graphic;
            return;
          }
        });
        var taxLotExtent = new esri.geometry.Extent();
                taxLotExtent.xmin = selectedTaxLot.geometry.x - .1;
                taxLotExtent.ymin = selectedTaxLot.geometry.y - .1;
                taxLotExtent.xmax = selectedTaxLot.geometry.x + .5;
                taxLotExtent.ymax = selectedTaxLot.geometry.y + .5;
        map.setExtent(taxLotExtent);
      }

Outcomes