Telerik blogs

Latest

  • Desktop WPF

    Displaying Hierarchy in RadGridView for WPF

    Building on my previous post where I talked about how to bind data to the RadGridView, today I want to show how you can display hierarchical data in the grid.  I will follow the same concept of building an application for a car repair shop to manage vehicles in for repair.  I will leverage two classes to display the data.  The original Car class which was used previously and a new CustomerComplaint class.  The Complaint property of the Car object was initially a string, but we need to allow for several issues to be reported so we will use the CustomerComplaint class to...
    January 22, 2009
  • Desktop WPF

    Displaying data quickly in the RadGridView for WPF

    The RadGridView for WPF uses the ItemsSource property for binding data.  ItemsSource is actually of type System.Object which not only allows you to bind to any data source that implements IEnumerable, but also the ADO.NET DataTable and DataSet.  In this post, I am going to demonstrate how you can quickly bind data to the RadGridView for WPF.  The task will be to build a car repair shop application which will display all the cars currently in the shop.  To get started we need to have some data, so we will use a simple class to store Car information.       public class Car       {           public string Make { get; set; }...
    January 20, 2009
  • Desktop WPF

    Detail row for your WPF DataGrid with ADO.NET DataService binding

    Using GridViewRow template and simple trigger you can define, style and show details for every data row in your RadGridView very easily:      <Style TargetType="{x:Type telerik:GridViewRow}">         <Setter Property="Template">             <Setter.Value>                 <ControlTemplate TargetType="{x:Type telerik:GridViewRow}">                      <!--Your template goes here -->                 <ControlTemplate.Triggers>                     <MultiTrigger>                        <MultiTrigger.Conditions>                           <Condition Property="IsSelected" Value="True" />                           <Condition Property="IsCurrent" Value="True" />                        </MultiTrigger.Conditions>                        <SetterProperty="Visibility" TargetName="GroupBox" Value="Visible" /> ...
    January 19, 2009
  • Desktop WPF

    Grouping data in the RadGridView for WPF

    When you first add the RadGridView to your WPF application you will undoubtedly notice the section at the top of the control which I have outlined in red.  This area is officially called the GridViewGroupPanel, but I am just going to call it the Group Panel to save myself some typing.  The Group Panel allows the user to drag and drop column headers into the panel in order to group the data in the RadGridView at runtime.  Below you will see that I have grouped my data by the "Make" column in my grid of vehicles. Additionally, the sort order of...
    January 17, 2009
  • Desktop WPF

    Master/Detail with RadGridView for WPF using ObjectDataProvider and ADO.NET Entities

    In my previous post, I showed how to instantiate LINQ to SQL DataContext using ObjectDataProvider in WPF. With ADO.NET Entities you can do something similar: <Grid.Resources> <ObjectDataProvider x:Key="customers" ObjectType="{x:Type local:NorthwindEntities}" MethodName="get_Customers"> </ObjectDataProvider> <ObjectDataProvider x:Key="orders" ObjectType="{x:Type local:NorthwindEntities}"...
    January 16, 2009