Select to view content in your preferred language

Creating attribute inspector on feature selection

446
1
05-27-2013 10:40 AM
StevenHaslemore
Regular Contributor
Hi.

In my work flow I'm looking to create attribute inspectors as needed rather than pre-initializing them.

The problem I have is getting the inspector to populate on the first selection.

I think I need to call some internal functions on the attribute inspector after it's creation to somewhat mimic what would happen during a selection.

I'm not having much luck so if someone knows and can share these steps I'd much appreciate it.

Steven
0 Kudos
1 Reply
StevenHaslemore
Regular Contributor
I found this posting that goes some of the way, but I agree it's a nasty hack and there must be functions we can call to achieve the result

http://forums.arcgis.com/threads/80810-AttributeInspector-quot-No-features-selected-quot

      self.attributeInspector._currentFeature = sel;
      self.attributeInspector.refresh();
      self.attributeInspector.domNode.children[0].innerHTML = layer.name;
      self.attributeInspector.domNode.children[1].setAttribute('style','display:block;');
      // next/ prev and other functions etc are under other nodes.
0 Kudos