Hi,
I added items to a treeview programmatically(with two for loop) and set the tag property to a value for each of an Child item. But there is a problem.
I added items to a treeview programmatically(with two for loop) and set the tag property to a value for each of an Child item. But there is a problem.
RadTreeViewItem rti;
for (int i = 0; i < ParentCount; i++)
{
rti =
new RadTreeViewItem();
rti.Header = Parent[i].Name;
for (int j = 0; j < ChildCount; j++)
{
rti.Items.Add(Child[j].Name);
rti.Tag = Child[j].Number);
}
MyRadTreeView.Items.Add(rti); //MyRadTreeView is declared at XAML code.
}
I want to reach rti's Tag property from any of an event(Selected, SelectionChange...), but none of these events give me the Tag property's value. The Tag's value comes with null.
How can I achieve this issue?