• .NET

    TreeView in a ComboBox dropdown using RadControls for Silverlight

    As far as I can tell from the experience of my colleagues with RadControls for ASP.NET AJAX, one of the common feature requests for RadComboBox and RadTreeView is combining them into one piece. Recently we started to receive similar requests for RadComboBox and RadTreeView for Silverlight. Placing a TreeView in a ComboBox sometimes makes a lot of sense, so I decided to research the best way to do it.   The first, the simplest and most obvious way is to place a RadTreeView as content of RadComboBox: <input:RadComboBox> <nav:RadTreeView  ItemTemplate="{StaticResource ItemTemplate}"  ItemsSource="{StaticResource ItemsSource}" /></input:RadComboBox> This works, but it has one important limitation: RadComboBox cannot...
    November 08, 2008
  • .NET

    Populating Silverlight TreeView from WCF Service with LINQ to SQL

    In this example I will show you how to populate a RadTreeView using LINQ and WCF. Also you will see how to transform a flat data into a hierarchical one. The target result is: 1. Create a new Silverlight Web Application Project NOTE: Make sure you choose "Web Application Project" After the project loads you can see that besides the regular Silverlight application, Visual Studio adds a Web application that will host the .xap file.   Before writing any LINQ or creating any WCF service, we need a database to target. 2. Right-click on RadTreeViewWithWCFWeb project and add a new item - "SQL Server Database". You can give the...
    August 27, 2008