Dynamically update 'isEditable' property on AttibuteInspector FieldInfo

396
0
10-31-2018 12:09 PM
NilsBabel
Occasional Contributor II

I'm using the ArcGIS Javascript API 3.26.  I'm trying to dynamically update the 'isEditable' property on a fieldInfo.  I want to set the 'isEditable' property to true when  user selects a certain value of another attribute.  I'm using the on 'attribute-change' event on the attributeInspector.  I have it working.  However, I can't refresh the info window with the new result.  The property updates correctly but the user won't see the result unless they close the info window and reopen it.  Is there a way to refresh the state of the info window dynamically?  The refresh() method on the attribute inspector does not seem to do this.  I'm guessing it only refreshes the contents not the properties or view.  I've also tried a refresh() on the dijit object but that doesn't seem to work either.  This is my code:  

attributeInspector.on('attribute-change', function (evt) {

   var fldName = evt.fieldName;

   var fldValue = evt.fieldValue;

   if (fldName == 'FuelsTreatment' && fldValue == 1) {       

      attributeInspector.layerInfos[1].fieldInfos[10].isEditable = true;       

      attributeInspector.refresh();

      dijit.byId(attributeInspector).refresh();

    }

});

Any ideas?

0 Kudos
0 Replies