Hi,
I have a datagrid that pops up with a click on the map, but I would like to add a close button(X), so the user can close the grid and clear the graphic. I can't figure out how to enable the close event. I keep getting "call to a possibly undefined method CloseMe"
Also, sometimes the datagrid is too long in width and goes beyond the screen, is there a way to limit the size and always center the datagrid. I am using Flex4 and it is non-sfv. thnx. Jerry
<esri:InfoSymbol id="drcogInfoSymbol" containerStyleName="drcogInfoSymbolStyle">
<esri:infoRenderer>
<fx:Component className="MyInfoWindowRenderer">
<mx:VBox>
<mx:HBox width="100%">
<mx:Label text="{data[0].LOCATION}" fontWeight="bold" />
<mx:Spacer width="100%"/>
<s:Button id="closeButton"
width="20" height="20" toolTip="close" click="CloseMe(event)"/>
<!-- <mx:Button id="closeButton" label="close" click="outerDocument.myButton_clickHandler(event)" width="18" height="18"/> -->
</mx:HBox>
<mx:DataGrid height="100%" width="100%" dataProvider="{data}"
horizontalScrollPolicy="auto" verticalScrollPolicy="on">
</mx:DataGrid>
</mx:VBox>
</fx:Component>
</esri:infoRenderer>
</esri:InfoSymbol>
public function closeMe(event:Event):void
{
PopUpManager.removePopUp(this);
Alert.show("My closed button was clicked!");
}