Select to view content in your preferred language

EditorWidget QueryTask to select features

626
1
Jump to solution
07-16-2013 12:48 AM
GrantCrosswell
Deactivated User
Is it possible to use the QueryTask to select a graphic then make EditVerticies handles active for it in the EditorWidget? (Rather than mouse click on the graphic) If so what would be the method I could use? I can select the graphic in the layer and zoom to location but cannot make this graphic the active one selected with the web editor for the user.

I then have a data grid of coordinates for the shape they would like to be able to update and use the SaveEdits on the EditorWidget toolbar. Even selecting the feature with the mouse I cannot seem to get a coordinate list to flag the FeatureLayer as having edits so the Editorwidget can do the save for the user?
0 Kudos
1 Solution

Accepted Solutions
GrantCrosswell
Deactivated User
Found an answer closer to home in the posts...
http://forums.arcgis.com/threads/18708-Problem-selecting-features-from-a-Feature-Layer

just used a slightly different linq query:
                IEnumerable<Graphic> IEgraphic = from g in _CurrentEditFeatureLayer.Graphics
                                                 where (g.Attributes[objId].Equals((int?)id)) && (id != null)
                                                 select g;  

                if (IEgraphic.Count() > 0)
                {
                    Graphic graphic = IEgraphic.First();
                    //  if polygon or line
                    if (editor.EditVertices.CanExecute(graphic))
                    {
                        _CurrentSelectedGraphic = graphic;
                        editor.EditVertices.Execute(graphic);

View solution in original post

0 Kudos
1 Reply
GrantCrosswell
Deactivated User
Found an answer closer to home in the posts...
http://forums.arcgis.com/threads/18708-Problem-selecting-features-from-a-Feature-Layer

just used a slightly different linq query:
                IEnumerable<Graphic> IEgraphic = from g in _CurrentEditFeatureLayer.Graphics
                                                 where (g.Attributes[objId].Equals((int?)id)) && (id != null)
                                                 select g;  

                if (IEgraphic.Count() > 0)
                {
                    Graphic graphic = IEgraphic.First();
                    //  if polygon or line
                    if (editor.EditVertices.CanExecute(graphic))
                    {
                        _CurrentSelectedGraphic = graphic;
                        editor.EditVertices.Execute(graphic);
0 Kudos