I'm after help how to write a bit of JS that will clear both map graphics and a dojo datagrid on an onclick map event.
I know that the syntax for clearing a map graphic is - map.graphics.clear(); but i dont or cant find how to clear the search results showing in a datagrid; and if indeed it is possible to clear a datagrid, how i structure the JS to add the two bits of code together in a onclick, show a popup infowindow function event.
Alternatively and probably the better soultion. After doing a search via a grid.datagrid function and zooming to my feature; how to write an onclick event to show an infowindow, but remove all the map graphics but in doing the map.graphic.clear not disconnecting the results in the datagrid, so that I can continue to select a result and zoom off to it. As its stands, if i add a map.graphic.clear to my function that does the popup infowindow, it clears all the map graphics from my search, however the search results remain in the datagrid but dont zoom off to the feature anymore.
Anyhow, any help would be great.
Thanks in advance
Simon