<?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 Dynamically update 'isEditable' property on AttibuteInspector FieldInfo in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-update-iseditable-property-on/m-p/416921#M38360</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the ArcGIS Javascript API 3.26.&amp;nbsp; I'm trying to dynamically update the 'isEditable' property on a fieldInfo.&amp;nbsp; I want to set the 'isEditable' property to true when&amp;nbsp; user selects a certain value of another attribute.&amp;nbsp; I'm using the on 'attribute-change' event on the attributeInspector.&amp;nbsp; I have it working.&amp;nbsp; However, I can't refresh the info window with the new result.&amp;nbsp; The property updates correctly but the user won't see the result unless they close the info window and reopen it.&amp;nbsp; Is there a way to refresh the state of the info window dynamically?&amp;nbsp; The refresh() method on the attribute inspector does not seem to do this.&amp;nbsp; I'm guessing it only refreshes the contents not the properties or view.&amp;nbsp; I've also tried a refresh() on the dijit object but that doesn't seem to work either.&amp;nbsp; This is my code:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attributeInspector.on('attribute-change', function (evt) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var fldName = evt.fieldName;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var fldValue = evt.fieldValue;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (fldName == 'FuelsTreatment' &amp;amp;&amp;amp; fldValue == 1) {&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;attributeInspector.layerInfos[1].fieldInfos[10].isEditable = true;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;attributeInspector.refresh();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dijit.byId(attributeInspector).refresh();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Oct 2018 19:09:04 GMT</pubDate>
    <dc:creator>NilsBabel</dc:creator>
    <dc:date>2018-10-31T19:09:04Z</dc:date>
    <item>
      <title>Dynamically update 'isEditable' property on AttibuteInspector FieldInfo</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-update-iseditable-property-on/m-p/416921#M38360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using the ArcGIS Javascript API 3.26.&amp;nbsp; I'm trying to dynamically update the 'isEditable' property on a fieldInfo.&amp;nbsp; I want to set the 'isEditable' property to true when&amp;nbsp; user selects a certain value of another attribute.&amp;nbsp; I'm using the on 'attribute-change' event on the attributeInspector.&amp;nbsp; I have it working.&amp;nbsp; However, I can't refresh the info window with the new result.&amp;nbsp; The property updates correctly but the user won't see the result unless they close the info window and reopen it.&amp;nbsp; Is there a way to refresh the state of the info window dynamically?&amp;nbsp; The refresh() method on the attribute inspector does not seem to do this.&amp;nbsp; I'm guessing it only refreshes the contents not the properties or view.&amp;nbsp; I've also tried a refresh() on the dijit object but that doesn't seem to work either.&amp;nbsp; This is my code:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attributeInspector.on('attribute-change', function (evt) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var fldName = evt.fieldName;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var fldValue = evt.fieldValue;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (fldName == 'FuelsTreatment' &amp;amp;&amp;amp; fldValue == 1) {&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;attributeInspector.layerInfos[1].fieldInfos[10].isEditable = true;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;attributeInspector.refresh();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dijit.byId(attributeInspector).refresh();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 19:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamically-update-iseditable-property-on/m-p/416921#M38360</guid>
      <dc:creator>NilsBabel</dc:creator>
      <dc:date>2018-10-31T19:09:04Z</dc:date>
    </item>
  </channel>
</rss>

