Refresh FeatureTable after adding feature.

5290
6
03-06-2015 10:27 AM
KeithGerhartz1
Occasional Contributor II

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

0 Kudos
6 Replies
DeryckMills
New Contributor II

I'd also be interested in getting this answered.

DeryckMills
New Contributor II

Keith -

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

0 Kudos
KeithGerhartz1
Occasional Contributor II

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

0 Kudos
DeryckMills
New Contributor II

Ok thanks.  I'm leaning that way also.

0 Kudos
AndyWright
Occasional 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
New Contributor III

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