How can i retreive "Header" of selected item in RadTreeView(SilverLight) control?
A:
Assuming I understand correctly that you only want to get at header content (in this example simple text) and that you are using RadTreeViewItem as your tree nodes you could do something like this in your selection event response:
private void radTreeView1_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
{
foreach (RadTreeViewItem item in e.AddedItems)
{
string header = item.Header.ToString();
// Do soemthing with the header value here
}
}
This example allows for multiple selection mode, but works as well for a single selection.
Enough already
2010-08-17 14:02:58