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);
 }