We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exception Thrown when Expanding first level

Thread ID:

Created:

Updated:

Platform:

Replies:

121155 Nov 15,2015 01:59 PM Nov 19,2015 06:46 AM WinRT 5
loading
Tags: SfTreeNavigator
Stergios
Asked On November 15, 2015 01:59 PM


Hello,

I'm trying to use the SfTreeNvaigator control using the following code:

ObservableCollection<TocItem> tocItems = new ObservableCollection<TocItem>();

for (int i = 1; i < 100;i++ )

{

TocItem tocItem = new TocItem();

tocItem.Name = "TOC " + i.ToString();

tocItems.Add(tocItem);

for (int j=0;j<10;j++)

{

TocItem subTocItem = new TocItem();

subTocItem.Name = "Sub Toc " +i.ToString()+" "+ j.ToString();

tocItem.ChildTocItems.Add(subTocItem);

}

}

treeNavigatorToc.ItemsSource = tocItems;



<Navigation:SfTreeNavigator Name="treeNavigatorToc" NavigationMode="Default" Width="300">

<Navigation:SfTreeNavigator.ItemTemplate>

<primitives:HierarchicalDataTemplate ItemsSource="{Binding ChildTocItems}">

<DataTemplate>

<StackPanel Orientation="Horizontal">

<TextBlock Text="{Binding Name}" VerticalAlignment="Center" Margin="18 0 0 0"/>

</StackPanel>

</DataTemplate>

<primitives:HierarchicalDataTemplate.ItemTemplate>

<primitives:HierarchicalDataTemplate ItemsSource="{Binding ChildTocItems}">

<DataTemplate>

<StackPanel Orientation="Vertical">

<TextBlock Text="{Binding Name}" VerticalAlignment="Center" Margin="18 0 0 0"/>

</StackPanel>

</DataTemplate>

<primitives:HierarchicalDataTemplate.ItemTemplate>

<DataTemplate>

<StackPanel Orientation="Vertical">

<TextBlock Text="{Binding Name}" VerticalAlignment="Center" Margin="18 0 0 0"/>

</StackPanel>

</DataTemplate>

</primitives:HierarchicalDataTemplate.ItemTemplate>

</primitives:HierarchicalDataTemplate>

</primitives:HierarchicalDataTemplate.ItemTemplate>

</primitives:HierarchicalDataTemplate>

</Navigation:SfTreeNavigator.ItemTemplate>

</Navigation:SfTreeNavigator>

The first level of items is displayed but when I click one of the items to expand and show the second level of the hierarchy, the following exception is thrown:
System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
   at Windows.UI.Xaml.Controls.ItemsControl.get_ItemTemplate()
   at Syncfusion.UI.Xaml.Controls.Navigation.SfTreeNavigator.NavigateItem(SfTreeNavigatorItem treeitem)
   at Syncfusion.UI.Xaml.Controls.Navigation.SfTreeNavigator.Select(Object item)
   at Syncfusion.UI.Xaml.Controls.Navigation.SfTreeNavigator.OnSelectionChanged(DependencyPropertyChangedEventArgs args)
   at Syncfusion.UI.Xa

What am I doing wrong?

Mariappan S [Syncfusion]
Replied On November 16, 2015 04:44 AM

Hi Stergios,

Thank you for contacting Syncfusion support.

We have prepared sample by using your code snippets and we have checked the reported issue in this sample. But we are unable to reproduce the reported issue in this sample.

Please download the sample from the below link.

Sample link: SfTreeViewNavigatorSample


Please have a look at the sample and if the issue still exists, could you please try reproducing it in the above sample or send reproducible sample and the reproducing steps. so that we could sort out the cause of the issue and provide you the solution?

Regards,
Mariappan S.

Stergios
Replied On November 17, 2015 03:59 PM

Hello and thank you for your support.

I have reproduced the issue by replacing the references Syncfusion.SfShared.WinRT and Syncfusion.SfTreeNavigator.WinRT (I couldn't find the dolls anyway)  by Syncfusion 8.1 controls for WinRT XAML, Version=13.3.0.12. I am attaching the modified sample.

Kind Regards,

Stergios

Attachment: SfTreeViewNavigatorSample_860c26aa.zip

Sugapriya Mariappan [Syncfusion]
Replied On November 18, 2015 05:19 AM

Hi Stergios,

We have checked our last updated sample with the product version 13.3.0.12.But we are still unable to reproduce the reported issue at our end. We have also taken a video which demonstrates our replication steps

Please find the video from the below link
Video link:video

Could you please check the attached video and let us know whether we have followed correct issue reproducing steps or not? If not, kindly share us more information by providing issue reproducing steps. This would help us to proceed further on this

Please let us know if you need any other assistance

Regards,
M.Sugapriya

Stergios
Replied On November 18, 2015 02:22 PM

Hi,

Please see the attached video that shows the problem. I have used the exact example that I attached to my previous reply.

Is it possible that the problem is related to the environment? I'm using VS Ultimate 2013 (12.0.40629.00 Update 5) on Windows 10.  

Regards,

Stergios

Attachment: record_31f105a1.zip

Sugapriya Mariappan [Syncfusion]
Replied On November 19, 2015 06:46 AM

Hi Stergios,

Currently we are preparing an environment which you mentioned in your last update. Could you please let us know whether you are facing the reported issue only in your machine or all other machines? Also please share us more information about the reported issue which would help us to reproduce from our side.

Regards,
M.Sugapriya

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;