New to Telerik UI for WPF? Start a free 30-day trial
Using In-Memory Data
Updated on Sep 24, 2025
The purpose of this tutorial is to show you how to populate a RadGridView with in-memory data.
The control will be bound to an ObservableCollection of Car objects. Each Car has a Name and Description.
- Create a new class named Car and add two properties - Name and Description. Both of the properties are of type string. Here is the source code:
C#
public class Car
{
public Car()
{
}
public Car(string name, string description)
{
this.Name = name;
this.Description = description;
}
public string Name
{
get;
set;
}
public string Description
{
get;
set;
}
}- Create a new class named RadGridViewSampleData.
C#
public class RadGridViewSampleData
{
public RadGridViewSampleData()
{
Cars = new ObservableCollection<Car>();
Cars.Add(new Car("BMW", "A german luxury car."));
Cars.Add(new Car("Porsche", "A german sports car."));
Cars.Add(new Car("Citroen", "A french luxury car."));
Cars.Add(new Car("Renault", "A french family car."));
}
public ObservableCollection<Car> Cars
{
get;
set;
}
}- Declare the RadGridViewSampleData object as a resource in your application.
XAML
<Grid.Resources>
<my:RadGridViewSampleData x:Key="DataSource"/>
</Grid.Resources>
- Update your RadGridView declaration - set the ItemsSource property.
XAML
<telerik:RadGridView x:Name="radGridView" ItemsSource="{Binding Source={StaticResource DataSource}, Path=Cars}"/>
Run your demo, the result can be seen on the next picture:

f you need to define the columns manually read the topic Defining Columns.