Select to view content in your preferred language

Popup not refreshing data after applyedits on FL

3207
6
Jump to solution
09-29-2015 12:01 PM
ArjunDongre
Regular Contributor

As the subject line suggests, the data in a popup for a feature layer record does not update after I update attributes using the featurelayer.applyedits() method. Attributes updates are done by the user in a separate dialog window. I even refresh/redraw the featurelayer upon completed execution. If I am zoomed into the record and then zoom to full extent of the map after I apply the edits, the map finally will go out and refresh the dataset. Any ideas on forcing the featurelayer to refresh the data? I am also using on demand mode for the feature layer.

Thanks.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
TimWitt2
MVP Alum

You could use the infowWindow InfoWindow | API Reference | ArcGIS API for JavaScript  and use the setContent method to populate it.

View solution in original post

0 Kudos
6 Replies
TimWitt2
MVP Alum

When you say refresh/redraw do you mean you use this method? FeatureLayer | API Reference | ArcGIS API for JavaScript

0 Kudos
ArjunDongre
Regular Contributor

Yes, that’s the one. After a closer look at refresh(), I called clearSelection() before that just to make sure the feature layer didn’t have that record selected for some reason. Still didn’t work. My popup is just the standard popup that I ripped from the JS Popup sample.

0 Kudos
ArjunDongre
Regular Contributor

I may just get rid of the popup and create my own dojo dialog popup.

0 Kudos
TimWitt2
MVP Alum

You could use the infowWindow InfoWindow | API Reference | ArcGIS API for JavaScript  and use the setContent method to populate it.

0 Kudos
ArjunDongre
Regular Contributor

Okay,

  So just sent the click event on the feature layer to my console so I can view the entire event. Looks like it really is not refreshing the layer at all, even though the edits post successfully. I thought it might just something to do with the popup class.

0 Kudos
ArjunDongre
Regular Contributor

So yea, I took the Object ID from the click event and ran a querytask to get the data, and outputted to the console in addition to the original click event. The original click event maintains the previous data even after the edits while the query gets the updated info. So I'll have to update an infoWindow using the query rather than the click event, or I can create some dojo dialog popup as well. Thanks for your help!

0 Kudos