Hi,I'm developing an application, and in it i get information to populate a DataGrid from an Identify Function.My problem is that the information needs to be in a very specific order, and i'm having trouble to obtain it.I started studying the IDictionary and found, hoping to find out my salvation, but here's what i got so far:
public class DataItem
{
public string Title { get; set; }
public IDictionary<string, object> Data { get; set; }
}
//This is called after the results are found!
public void getIdentifyResults(List<IdentifyResult> results)
{
_dataItems = new List<DataItem>();
linhaDeObservações = new List<string>();
if (results != null && results.Count > 0)
{
IdentifyComboBox.Items.Clear();
foreach (IdentifyResult result in results)
{
/* there can be more than oe result, each with several
* lines, which i must select a few.
*/
Graphic LineCatcher = new Graphic();
/* The following line should get lines by it's key (like "number", for example)
* and will be repeated several times.
*/
LineCatcher.Attributes.Add(result.Feature.Attributes.Where(/*Don't know what to put here*/);
string title = result.Value.ToString() + " (" + result.LayerName + ")";
_dataItems.Add(new DataItem()
{
Title = title,
Data = LineCatcher.Attributes
});
IdentifyComboBox.Items.Add(title);
}
IdentifyComboBox.SelectedIndex = 0;
}
}
Anyone can help me?