This is a migrated thread and some comments may be shown as answers.

Treeview with SQL

7 Answers 117 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rodri
Top achievements
Rank 1
Rodri asked on 29 Jun 2010, 11:34 AM

Hello everyone, first of all congratulations for your forum.

Im having a problem, im trying to populate a treeview with SQL tables, im starting from where:

http://www.telerik.com/support/kb/silverlight/general/populating-treeview.aspx

i have downloaded the file RadTreeViewWithWCF.zip.

I dont have any error´s or warning, but im having this message "Xaml Parse Exception" ocurred on this class:

using System.Windows.Controls;

namespace RadTreeViewWithWCF

{

public partial class Page : UserControl

{

public Page()

{

InitializeComponent();

}

}

}

On XML says that cant load the HierarchicalDataSource, recently i have discovered that this problem is connected with the fact that i dont have the old System.Windows.Controls

 

Any Ideias? Any demo with SQL and treeview? can you please help me. Thank you

7 Answers, 1 is accepted

Sort by
0
Rodri
Top achievements
Rank 1
answered on 30 Jun 2010, 12:15 PM
No one can help me with this question? Any demo that use this (Treeview with SQL)?!

Thanks

0
Tina Stancheva
Telerik team
answered on 01 Jul 2010, 05:54 PM
Hello Rodri,

Please find an updated attached a sample project using  WCF Services with LINQ to SQL to populate a RadTreeView.

Please take a look at it and let me know if it works for you.

Also, you can take a look at this forum thread describing how to populate TreeView using RIA Services.

Let us know if you need more info.

Kind regards,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rodri
Top achievements
Rank 1
answered on 08 Jul 2010, 10:35 PM
Thanks for the project and the help,

I have this information " The silverlight project you are about to debug uses web services. calls to the web service will fail unless the silverlight project is hosted in and launched from the same web project tha contains the web services"

Then i choose to debug it any way, and it kee´p´s always waiting for localhost and nothing happens...

Any help, any project that really work with telerik treeview and a data base in SQL?
 
Thanks again for all you help, keep in the good work
Rodrigo Aires.
0
Tina Stancheva
Telerik team
answered on 09 Jul 2010, 08:35 AM
Hi Rodri,

When you open the example, you will need to set the TreeViewSelfReferenceWCFService.Web project as a Start-Up project and the TreeViewSelfReferenceWCFServiceTestPage.aspx as start page before running the project.

I prepared a sample video illustrating that. Please give it a try and let me know if you need more info.

Sincerely yours,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rodri
Top achievements
Rank 1
answered on 09 Jul 2010, 11:11 AM
You are the man, thanks, it´s done. Excellent work. ;)

Regards Rodrigo Aires
0
Rodri
Top achievements
Rank 1
answered on 14 Jul 2010, 04:45 PM
Hello again, i was trying to use this project with the Microsoft Expression Blend, but it´s not working...
I have an attachement with a picture that could help you....

Thanks one more time! Regards Rodrigo Aires
0
Miroslav
Telerik team
answered on 19 Jul 2010, 12:04 PM
Hi Rodri,

This happens because what you see in blend is a running instance of the application / page that is being designed.

In the code a call to the web service is made. Since it is not available during design-time, it fails.

You can change the constructor of the HierarchicalDataSource like so:

public HierarchicalDataSource()
{
    if (!System.ComponentModel.DesignerProperties.IsInDesignTool)
    {
        //Create a new instance of the web service and get the data from the table
        MyServiceClient webService = new MyServiceClient();
        webService.GetMyDataCompleted += 
            new EventHandler<GetMyDataCompletedEventArgs>(webService_GetMyDataCompleted);
        webService.GetMyDataAsync();
    }
}

This will make sure that the service call will not be made during design-time.

Sincerely yours,
Miroslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Rodri
Top achievements
Rank 1
Answers by
Rodri
Top achievements
Rank 1
Tina Stancheva
Telerik team
Miroslav
Telerik team
Share this question
or