Telerik blogs

Latest

  • Web

    Using the RadDocking control with Prism

    Prism can be thought of as a set of libraries that help Silverlight applications to be scalable and testable. It has a number of features (modularity, view regions and commanding) that help with this. A common scenario is to use Prism with a Docking control. You may want to create a shell with a Docking control and to mark some of the pane groups as regions and to use panes (or their content) as views. In this article we will create a sample application that accomplishes this scenario with the RadDocking control for Silverlight. We will need one additional step to...
  • Web

    TreeView in ComboBox, take 3 (Silverlight 3, WPF and RadControls)

    In my previous article on the same topic I described how to replace the ItemsPresenter of RadComboBox with a RadTreeView. It was as simple as updating the control template. Unfortunately the controls’ selection synchronization relied on a bug in RadComboBox that we recently fixed – the control was able to have a value in its SelectedItem property, that was not present in its Items collection. Now, in order to workaround this new problem, we have to either inherit RadComboBox, or create an attached behavior that will allow us to get the SelectedItem of the inner RadTreeView. The code you have to write...
    August 28, 2009
  • Web

    Self-reference hierarchy with Telerik TreeView for Silverlight

    Often we need to display in a TreeView flat, self-referencing data, loaded from a database, that has properties ID and ParentID (or similar) that define the hierarchy. The Telerik TreeView for ASP.NET can automatically bind itself to such data, but our Silverlight TreeView cannot do this out of the box. Fortunately, this “limitation” can be easily avoided with a simple value converter. There is a little trick, however – each data item needs a reference to its parent collection. Consider the following very simple data object: public class DataItem : INotifyPropertyChanged { private string text;   public int ID { get; set; } public int ParentID {...
    August 27, 2009
  • Web

    Mark working hours and days in different colors with RadScheduler for Silverlight

    We received a couple of questions on how some of the days and hours in the different views of RadScheduler can be customized. The answer of this question is in the attached application illustrating how working hours and days can be  marked in orange.  The solution includes 3 easy steps : Create a custom theme using the default RadScheduler' theme. Create a ValueConverter returning the right color depending on the hour/day. Find the style applied to every hour(timeslot) and apply the converter to the Background property. To create a custom theme you can follow the steps...
  • Web

    Using WCF for Silverlight Development with Telerik OpenAccess

    digg_url = "http://www.stephenforte.net/PermaLink,guid,e137f5a7-7bea-4722-9359-5f830d95e691.aspx";digg_title = "Using WCF for Silverlight Development with Telerik OpenAccess";digg_bgcolor = "#FFFFFF";digg_skin = "normal";digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined; Microsoft’s Silverlight 3.0 is a great new platform for building line of business applications. With every new technology advancement, we always seem to lose something. With Silverlight we lose the dirt simple data access since Silverlight does not support System.Data.SQLClient and talking to a database directly. This forces us into a service oriented architecture and an asynchronous model. While this is definitely a best practice, it sometimes takes a little getting used to. With Silverlight we have to wrap up our data access layer into WCF services. (Or Astoria, RIA Services, or something similar.) It is also pretty standard to use some kind of ORM like the Entity Framework...
    August 20, 2009