Ok thank you for the help. That works great if i set the FeatureLayer Mode to "OnDemand" or "Snapshot", but if i set it so SelectionOnly no Feature is shown.The filteredGraphics List in your Code doesnt contains any Features so no Feautre is found.It would be great if i could select a feature by code from the layer and just the features that fulfill the where-clause are shown in the DataGrid.Do you have any Ideas concerning that problem?Thanks in AdvanceUlf
Hello, i have a question concerning the selection of a FeatureDataGrids or FeatureLayers.In my Application i have a FeatureLayer and a FeatureDataGrid. If i select a row in the datagrid the feature in the map is selected and vise versa. Now i would like to select a Feature via CodeBehind. Is that possible? For example i would like to select the feature by specific Attributes.Thanks in Advance!
List<Graphic> filteredGraphics = featureLayer.Graphics.Where(g => Convert.ToString(g.Attributes["AttributeKey"]) == "AttributeValue").ToList(); foreach (Graphic g in filteredGraphics) { g.Select(); }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.