Select to view content in your preferred language

Refresh FeatureTable after adding feature.

5462
6
03-06-2015 10:27 AM
KeithGerhartz1
Frequent Contributor

How would one refresh a Javascript FeatureTable digit after adding or updating a feature in the underlying FeatureTable?

0 Kudos
6 Replies
DeryckMills
Emerging Contributor

I'd also be interested in getting this answered.

DeryckMills
Emerging Contributor

Keith -

Did you get an answer for this?  I've been trying to resolve it for a couple of days.

0 Kudos
KeithGerhartz1
Frequent Contributor

No answer. Sorry. I ended up ditching it in favor of using dGrid.

0 Kudos
DeryckMills
Emerging Contributor

Ok thanks.  I'm leaning that way also.

0 Kudos
AndyWright
Frequent Contributor

Hi Keith,

I stumbled on some code in one of the Esri samples that works for refreshing a FeatureTable.  I would have thought this would be a method call on the FeatureTable itself, but anyway.  You basically need to destroy the div that contains your feature table and then recreate it on the fly.  It's working like a charm for me.  The outageDiv referenced below is the parent div of the div that contains the FeatureTable.

if (registry.byId("outageTableNode")) {

                        registry.byId("outageTableNode").destroy();

                        domConstruct.create("div", { id: "outageTableNode" }, dom.byId("outageDiv"));

                        console.log("re-creating table");

                    }

NMWater
Regular Contributor

Did you guys ever resolve this issue? I'm trying to get the feature table to refresh after changing the visibility of the feature layer.

0 Kudos