Up Display code samples
DevForce Resource Center » Samples » Display code samples » Code sample: Binding Telerik controls (WPF)

Code sample: Binding Telerik controls (WPF)

Last modified on September 20, 2012 11:08

This sample shows how to bind a DevForce entity model to Telerik UI controls.


Platform: WPF
Language: C#
Download: WPF_TelerikWalk.zip

Problem

You want to learn how to bind a collection of entities to a TextBox, ComboBox, and DataGrid.

Solution

This WPF solution uses Telerik controls to show a master-detail view. The master view on the left is implemented with a DataGrid and allows you to select a Product. The detail view on the right allows you to edit the properties of the selected Product. The master and detail views are synchronized because they are using the same datasource (and therefore share the same .NET CurrencyManager).

The ComboBox databinding is performed in an object-oriented fashion, by binding the Supplier property of the Product (a navigation property that returns the Supplier Entity for a Product), to the Self property on the Entity which was defined on the partial class.

main-window.png

Prerequisites

Created by DevForce on March 13, 2012 12:32

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2020 IdeaBlade