Telerik blogs

Latest

  • Desktop WPF

    Filtering GridViewComboBoxColumn in RadGridView for WPF

      GridViewComboBox column is used to display lookup data in user friendly manner. For our demo we bind RadGridView for WPF to a collection of custom Location objects.       As you may notice – each location has a selectable Country field.  Here is the underlying ‘data model’.   public class Location { public int CountryID { get; set; } public string CityName { get; set; } } public class Country { public int ID { get; set; } public string Name { get; set; } }   The location object contains the integer CountryID.Each CountryID corresponds to a certain country and with the help of GridViewComboBoxColumn we see some human readable country names instead of the...
    January 20, 2010
  • Desktop WinForms

    Formatting Cell Values in the RadGridView for WinForms

    Earlier this week while working on another blog entry, I ran into a unique situation involving the RadGridView. Basically, what I am doing is retrieving user status data from Facebook using the Facebook Developer Toolkit. The data is returned in a list of objects based on the Facebook API schema. These objects are of type user_status and contain the following: uuid - long status_id - long time - long source - string message - string comment_count - int I basically wanted to take this list and bind it to the RadGridView showing only the message and the time for that message. This was pretty ...
    January 15, 2010
  • Desktop WPF

    Using Compass indicators properties for Telerik's Docking Control for Silverlight and WPF

    Sometimes when using a Docking control and implementing complex UI with it we need to add some custom rules about allowing some panes to be docked in some parts of the application and to disallow them to dock to other parts. As this behavior is quite complex itself, we’ve decided to enable some scenarios to be available in XAML in a declarative way (the more static scenarios) and some scenarios to be available only through the code-behind.   In this post I will guide you through some simple steps that will show you how you could use both approaches. First of all...
    December 29, 2009
  • Desktop WPF

    How To: Easy print and print preview with RadGridView for WPF

    Using FixedDocument, DocumentViewer and PrintDialog you can easily create your own print and/or print preview for RadGridView for WPF. I’ve made two extension methods Print() and PrintPreview() to illustrate how to turn the grid into a print friendly document in few lines of code: … public static void PrintPreview(this GridViewDataControl source) { var window = new Window() { Title = "Print Preview", Content = new DocumentViewer() ...
    December 28, 2009
  • Desktop WPF

    Silverlight/WPF : Custom Legend with RadChart

      One of the less known features supported by Telerik’s RadChart for Silverlight/WPF is the ability to completely abandon the default control layout and build one of your own with no constraints for the number of elements used. The goal of this blog post is to shed some light on this functionality and to demonstrate the most common techniques that can be used to customize the legend. First of all, to build your own custom chart layout you should set the UseDefaultLayout property of the RadChart object to false. Here is the custom layout I prepared: <telerik:RadChart x:Name="RadChart1" UseDefaultLayout="False">             <Grid>                 <Grid.ColumnDefinitions>                     <ColumnDefinition Width="50"/>                     <ColumnDefinition Width="*"/>                 </Grid.ColumnDefinitions>                 <Grid.RowDefinitions>                     <RowDefinition Height="*"/>                    ...
    December 23, 2009