Hi,We are trying to make a popup DataGrid to be clickable and center the map on the selected parcel. I'm trying to modify the code from those two great threads --> http://forums.arcgis.com/threads/10377-How-to-zoom-to-selected-record-on-Data-Grid-result?p=35685&posted=1#post35685 and http://forums.arcgis.com/threads/11765-How-to-make-mouserover-on-map-amp-highlight-popup-datagrid?p=35962#post35962There is a problem with communication between the application and the popup window. There is a click event in the DataGrid which leads to this function:private function sfDataGrid_Click():void
{
var obj:Object = sfDataGrid.selectedItem;
if (obj != null)
{
lastIdentifyResultGraphic = null;
query.where = "STATE_NAME = '" + obj["STATE_NAME"] + "'"
queryTaskZoom.execute(query, new AsyncResponder(onResult, onFault));
function onResult(featureSet:FeatureSet, token:Object = null):void
{
lastIdentifyResultGraphic = featureSet.features[0];
lastIdentifyResultGraphic.symbol = sfs;
MainMap.extent = new Extent(lastIdentifyResultGraphic.geometry.extent.xmin,lastIdentifyResultGraphic.geometry.extent.ymin,lastIdentifyResultGraphic.geometry.extent.xmax,lastIdentifyResultGraphic.geometry.extent.ymax);
}
function onFault(info:Object, token:Object = null):void
{
Alert.show(info.toString(), "Query Problem");
}
}
}but when I click in the popup while debugging I get a "TypeError: Error #1009: Cannot access a property or method of a null object reference." at component query.where = "STATE_NAME = '" + obj["STATE_NAME"] + "'"
Any ideas what we are doing wrong?Thank you!