AnsweredAssumed Answered

Dynamically update 'isEditable' property on AttibuteInspector FieldInfo

Question asked by nilsbabel on Oct 31, 2018

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?

Outcomes