What I am trying to do is populate two columns in a window. This columns will have the name of the global variable and the path it to it. I am having problems displaying what i need in the windows.
<TabItem Header="Global Variables" GotFocus="GlobalVariablesTab_GotFocus">
<dc:TreeListView Name="tvwGlobalVariables" dc:ColumnLayoutManager.Enabled="True" >
<dc:TreeListView.Columns>
<!--First Column. -->
<dc:StdGridViewColumn Header="Variable" Width="200" >
<dc:StdGridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock TextTrimming="CharacterEllipsis"/>
</DataTemplate>
</dc:StdGridViewColumn.CellTemplate>
</dc:StdGridViewColumn>
<!-- Second Column-->
<dc:StdGridViewColumn Header="Result" dc:ColumnRange.IsFillColumn="True"/>
</dc:TreeListView.Columns>
</dc:TreeListView>
</TabItem>
This is the tab that has the area i need to populate. The first column for the name and the second will be for the path. I may be missing something as well.
private void GlobalVariablesTab_GotFocus(object sender, RoutedEventArgs e)
{
lvGlobals.Items.Clear();
sman = SchemaManager.SchemaManager.GetInstance();
IEnumerator enumerator = sman.GetGlobalVariableEnumerator();
while (enumerator.MoveNext())
{
DictionaryEntry entry = (DictionaryEntry) enumerator.Current;
ListViewItem lvi = new ListViewItem();//new string[] {entry.Key.ToString(), entry.Value.ToString()});
lvi.Tag = entry.Key.ToString() + entry.Value.ToString();
}
}
Currently i have lvi holding both parts but i will need one part to go to the first column and the other part to the other column. I don't intend to keep lvi if I don't need it. Either way i need to get entry.key displayed in the first column and entry.value in the second. Any ideas?