<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting graphics index by clicking on infoRenderer in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571962#M12873</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rene, thank you for your prompt reply. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;one of the problems here is that arrayCollection is not in scope of infoRenderer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So from itemRenderer I need to get it's index in the collection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alexander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Dec 2010 21:42:03 GMT</pubDate>
    <dc:creator>AlexanderStepanov</dc:creator>
    <dc:date>2010-12-14T21:42:03Z</dc:date>
    <item>
      <title>Getting graphics index by clicking on infoRenderer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571960#M12871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I appreciate if someone could give me a hint on the following problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In application, I have a graphics layer which has a DataProvider property set to an array collection. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(so the array collection consists of points with attributes and is a data source for my graphics layer). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To define a style of points and to draw them, I use infoRenderer with states: one of states has a button "delete". The idea is to able a user to delete point from a layer. ( in other words I need to remove an object from the arrayCollection/dataProvider by its index.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still cannot figure out how ( when a user clicks on "delete" button ) to get an index of the graphic in the array collection? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alexander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 20:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571960#M12871</guid>
      <dc:creator>AlexanderStepanov</dc:creator>
      <dc:date>2010-12-14T20:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting graphics index by clicking on infoRenderer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571961#M12872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can add an eventListener to each graphic in the arraycollection,then when it gets clicked, save that item so that when you click on delete you can find it in the ArrayCollection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, something like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var graphic:Graphic = event.currentTarget as Graphic;
var i:int = arrayCollection.getItemIndex(graphic);
arrayCollection.removeItemAt(i);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:37:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571961#M12872</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-12T00:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Getting graphics index by clicking on infoRenderer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571962#M12873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rene, thank you for your prompt reply. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;one of the problems here is that arrayCollection is not in scope of infoRenderer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So from itemRenderer I need to get it's index in the collection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alexander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 21:42:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571962#M12873</guid>
      <dc:creator>AlexanderStepanov</dc:creator>
      <dc:date>2010-12-14T21:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting graphics index by clicking on infoRenderer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571963#M12874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This sample may help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=273322&amp;amp;mc=3#844179"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=273322&amp;amp;mc=3#844179&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 16:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571963#M12874</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-12-15T16:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Getting graphics index by clicking on infoRenderer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571964#M12875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dasa and Rene, thank you for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works fine now!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alexander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 19:50:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/getting-graphics-index-by-clicking-on-inforenderer/m-p/571964#M12875</guid>
      <dc:creator>AlexanderStepanov</dc:creator>
      <dc:date>2010-12-15T19:50:00Z</dc:date>
    </item>
  </channel>
</rss>

