In some of our screens, we use the LoadOnDemand feature of TreeViews by adding new RadTreeViewItems to recently expanded node. Here's a sample event handler for how we do this:
Previously, this would result in the new child item being the final leaf in the tree with no expand icon. But after upgrading to the new Q3 controls, the TreeView is ignoring the value of the IsLoadOnDemandEnabled property of the new item and is allowing that item to be expanded.
private
void
EventTreeView_LoadOnDemand(
object
sender, Telerik.Windows.RadRoutedEventArgs e)
{
var item = e.OriginalSource
as
RadTreeViewItem;
var entity = item.DataContext
as
TestItem;
item.IsLoadingOnDemand =
true
;
var newItem =
new
TestItem {Name = entity.Name +
" - 1"
};
item.Items.Add(
new
RadTreeViewItem
{
DataContext = newItem,
Header = newItem.Name,
IsLoadOnDemandEnabled =
false
});
item.IsLoadingOnDemand =
false
;
item.IsLoadOnDemandEnabled =
false
;
}
Previously, this would result in the new child item being the final leaf in the tree with no expand icon. But after upgrading to the new Q3 controls, the TreeView is ignoring the value of the IsLoadOnDemandEnabled property of the new item and is allowing that item to be expanded.