Select to view content in your preferred language

QueryTask Results Attribute Aliases

952
0
09-06-2012 07:36 AM
ElisabethvanderLeeuw
Emerging Contributor
I am trying to display the attribute aliases in the datagrid - from the results of a query task or from any graphic layer that was added to the TOC as the result of a query or find / etc.  I've found several posts (Silverlight API) - but how do I relate the code to the datagrid in the Viewer?  How do I access the datagrid in the Viewer in code behind?

thank you.

foreach (KeyValuePair<string, string> kv in featureSet.FieldAliases)
{
                          
                DataGridTextColumn dataGridColumn = new DataGridTextColumn();
                Binding b = new Binding("Attributes");
                b.Converter = new DictionaryConverter();
                b.ConverterParameter = kv.Key;
                dgtxtcol.B.Binding = b;
                dataGridColumn.Header = kv.Value;

                QueryDetailsDataGrid.Columns.Add(dataGridColumn);
}
0 Kudos
0 Replies