void QueryTask_ExecuteCompleted(object sender, QueryEventArgs e) { FeatureSet fs = e.FeatureSet; if (fs.Count() == 0) { MessageBox.Show("Sorry, no data matches your query. Please try again", "Query", MessageBoxButton.OK); } else { FeatureSet fsSort = new FeatureSet(fs.OrderBy(x => x.Attributes[fs.DisplayFieldName])); fsSort.DisplayFieldName = fs.DisplayFieldName; fsSort.GlobalIdFieldName = fs.GlobalIdFieldName; fsSort.ObjectIdFieldName = fs.ObjectIdFieldName; ... do whatever with fsSort ...............
IList<Graphic> gsort = fs.Features.OrderBy(x => x.Attributes[fs.DisplayFieldName]).ToList(); fs.Features.Clear(); foreach (var g in gsort) { fs.Features.Add(g); } ... do whatever with fs, which still has valid FieldAliases ......
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.