Solved! Go to Solution.
Check out this thread for details on how to retrieve all the attributes from the graphic:
http://forums.arcgis.com/threads/26234-Identify-Results-2.2-getContent?highlight=getContent
When I click on a row in my datagrid it zooms the map and the infowindow box pops up, but the attributes don't display.
How do I get the results to display in the infowindow?
Thanks
Jimmy Brink
This part of my application based off of the Find Results in DataGrid sample.
Code from the onRowClickHandler below:
function onRowClickHandler(evt) {
// points don't have a getExtent() method...
// if selectedWarrant is a point, center the map on it
var clickedWarrantID = grid.getItem(evt.rowIndex).OBJECTID;
var selectedWarrant;
var level = 11;
dojo.forEach(map.graphics.graphics, function (graphic) {
if ((graphic.attributes) && graphic.attributes.OBJECTID === clickedWarrantID) {
selectedWarrant = graphic;
map.infoWindow.setContent(graphic.getContent());
return;
}
});
if (selectedWarrant.geometry.declaredClass == 'esri.geometry.Point') {
map.centerAndZoom(selectedWarrant.geometry, map.setLevel(level));
var sp = map.toScreen(selectedWarrant.geometry);
//map.infoWindow.setContent(graphic.getContent());
map.infoWindow.show(selectedWarrant.geometry, map.getInfoWindowAnchor(sp));
} else {
var WarrantExtent = selectedWarrant.geometry.getExtent();
var screenpoint = map.toScreen(selectedWarrant.geometry.getExtent().getCenter());
var mappoint = map.toMap(screenpoint);
map.centerAt(mappoint);
map.centerAndZoom(sp, level);
map.infoWindow.show(WarrantExtent.getCenter(), map.getInfoWindowAnchor(screenpoint));
}
}
Check out this thread for details on how to retrieve all the attributes from the graphic:
http://forums.arcgis.com/threads/26234-Identify-Results-2.2-getContent?highlight=getContent