I'm trying to set the expanded state on load. I'm using the following RowLoaded handler.
private
void
PspTreeListView_RowLoaded(
object
sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
{
PspTreeViewObject pspTreeViewObject = e.DataElement
as
PspTreeViewObject;
TreeListViewRow treeListViewRow = e.Row
as
TreeListViewRow;
if
(treeListViewRow !=
null
&& pspTreeViewObject !=
null
)
{
treeListViewRow.IsExpanded = pspTreeViewObject.IsExpanded;
}
}>
This works to set the expanded state properly, but then none of the items in the treeview can be expanded or contracted. I tried setting IsExpandable to true for the items, but that didn't work either. It seems that once the initial state is set, it cannot be changed.
Any ideas on how I can fix this?