DomainDataSource Support
The purpose of this tutorial is to show you how to populate RadGridView with data using DomainDataSource.
This tutorial will use the Northwind database, which can be downloaded from here.
- Add a new RadGridView declaration in your XAML:
<telerik:RadGridView x:Name="radGridView" Margin="8"/>
- Declare a new DomainDataSource object in the resources of your application. Set its DomainContext property to an existing RIA Service.
<telerik:DomainDataSource x:Key="DomainDataSource" AutoLoad="True" QueryName="GetCustomers">
<telerik:DomainDataSource.DomainContext>
<local:SampleRiaContext/>
</telerik:DomainDataSource.DomainContext>
</telerik:DomainDataSource>
- Update your RadGridView declaration - set the ItemsSource property.
<telerik:RadGridView Margin="8"
sSource="{Binding Source={StaticResource DomainDataSource}, Path=Data}"/>
If you need to define the columns manually read the topic Defining Columns.