I want to use the TreeListView control with LightSwitch where I have a single table with self-referencing.
However, every time I run the program an exeption is thrown saying:"It is not valid to execute the operation on the current thread"
I think that the problem is that LightSwitch is trying to load children data on the UI thread
This is my XAML:
<telerik:RadTreeListView x:Name="_radTreeListView" ItemsSource="{Binding Value.RootAccounts}" >
<telerik:RadTreeListView.ChildTableDefinitions >
<telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
</telerik:RadTreeListView.ChildTableDefinitions>
</telerik:RadTreeListView>
When I remove the ItemsSource property from the TreeListViewTableDefinition
, the Root nodes (from Value.RootAccounts) are displayed correctly.
however the TreeView is working with LightSwitch because it support LoadOnDemand, but The TreeListView does not have this property and seem that it support of the "Load On Demand" is different from the TreeView...
However, every time I run the program an exeption is thrown saying:"It is not valid to execute the operation on the current thread"
I think that the problem is that LightSwitch is trying to load children data on the UI thread
This is my XAML:
<telerik:RadTreeListView x:Name="_radTreeListView" ItemsSource="{Binding Value.RootAccounts}" >
<telerik:RadTreeListView.ChildTableDefinitions >
<telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
</telerik:RadTreeListView.ChildTableDefinitions>
</telerik:RadTreeListView>
When I remove the ItemsSource property from the TreeListViewTableDefinition
, the Root nodes (from Value.RootAccounts) are displayed correctly.
however the TreeView is working with LightSwitch because it support LoadOnDemand, but The TreeListView does not have this property and seem that it support of the "Load On Demand" is different from the TreeView...