Telerik blogs
  • Web

    Reusing and customizing a single ContextMenu on a TreeView with RadControls for Silverlight

    This is part two of my Attaching a ContextMenu on TreeView blog post. I will show another approach for adding context menu on a treeview, that uses a single menu that is customized for each treeview item. One context menu per treeview should provide much better performance if the treeview is bound to a large data set, since there are much less visual elements that have to be created. I am also using an updated view model, where each item contains a reference to its parent. This will help me to rely entirely on the model for my application logic, which greatly...
    June 01, 2009
  • Desktop WPF

    Using RadTreeView for WPF

    The video below is from a webinar that I presented on the RadTreeView for WPF.  The webinar covered some of the basic functionality of the RadTreeView and should give you a good understanding of how to get started with the RadTreeView.  While this webinar is focused on the WPF version of the RadTreeView control, the content is also relevant to the Silverlight version as...
    May 01, 2009
  • Web

    Attaching a ContextMenu on a TreeView with RadControls for Silverlight

    Telerik RadControls for Silverlight provide a very powerful ContextMenu control, that supports right click, modifier keys and that can be easily attached to any visual element. In this article I will show how to attach RadContextMenu to a data-bound RadTreeView and perform actions on the clicked treeview items, depending on the selection in the context menu. For simplicity, here I will use a treeview, bound to a static collection, but it can be easily extended to load its items from a web service: <UserControl x:Class="ContextMenuInTreeView.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:ContextMenuInTreeView" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"> <UserControl.Resources> <local:DataViewModel x:Key="ViewModel" /> <telerik:HierarchicalDataTemplate x:Key="TreeViewItemTemplate" ItemsSource="{Binding Children}"> <TextBlock Text="{Binding Text}"> <telerikNavigation:RadContextMenu.ContextMenu> <telerikNavigation:RadContextMenu> <telerikNavigation:RadMenuItem Header="New Child" /> <telerikNavigation:RadMenuItem Header="New Sibling" /> <telerikNavigation:RadMenuItem Header="Delete" /> </telerikNavigation:RadContextMenu> </telerikNavigation:RadContextMenu.ContextMenu> </TextBlock> </telerik:HierarchicalDataTemplate> </UserControl.Resources> <StackPanel Background="White" DataContext="{StaticResource...
    April 27, 2009
  • Release

    Two New RadTips Episodes: RadGrid, Entity Framework, and More!

    I’m happy to announce two new episode of RadTips, a series of screencasts offering tips and tricks for using Telerik's RadControls. If you've missed previous episodes, be sure to check them out on Telerik TV. Each is only a few minutes long and covers a specific feature of the RadControls. Adding a HeaderContextMenu to the RadGrid for ASP.NET AJAX In this episode I show ASP.NET AJAX developers how to use the HeaderContextMenu to perform column-specific operations in the RadGrid. Click here to watch on Telerik TV The video is available for download below. [Video: MP4] Using the Entity Framework with the RadControls for ASP.NET AJAX In this...
    April 24, 2009
  • Web

    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