New to Telerik UI for WPF? Start a free 30-day trial
CRUD
Updated on Sep 15, 2025
You can utilize all CRUD operations by working with the DataView property of the RadDataServiceDataSource control and add, edit or remove entities from the collection which is of type DataItemCollection. You can do that either programmatically via the API of the collection or leave the job to RadGridView by binding its ItemsSource to the DataView.
Example 1: Bind the DataView collection to RadGridView's ItemsSource
XAML
<Grid>
<telerik:RadDataServiceDataSource Name="customersDataSource" QueryName="Customers" AutoLoad="True">
<telerik:RadDataServiceDataSource.DataServiceContext>
<local:MyNorthwindContext/>
</telerik:RadDataServiceDataSource.DataServiceContext>
</telerik:RadDataServiceDataSource>
<telerik:RadGridView ItemsSource="{Binding DataView, ElementName=customersDataSource}" IsBusy="{Binding IsBusy, ElementName=customersDataSource}" />
</Grid>
Once you're ready to submit the changes you can call the SubmitChanges method of the control.
Example 2: Submit the changes in the view
C#
private void SubmitButton_Click(object sender, RoutedEventArgs e)
{
this.CustomersDataSource.SubmitChanges();
}In order to reject the changes and reload the original data from the server you need to call the RejectChanges method of the control.
Example 3: Submit the changes in the view
C#
private void RejectButton_Click(object sender, RoutedEventArgs e)
{
this.CustomersDataSource.RejectChanges();
}