New to Telerik UI for Silverlight? Download free 30-day trial


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

    <telerik:RadDataServiceDataSource Name="customersDataSource" QueryName="Customers" AutoLoad="True"> 
    <telerik:RadGridView ItemsSource="{Binding DataView, ElementName=customersDataSource}" IsBusy="{Binding IsBusy, ElementName=customersDataSource}" /> 
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

private void SubmitButton_Click(object sender, RoutedEventArgs e) 
Private Sub SubmitButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) 
End Sub 

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

private void RejectButton_Click(object sender, RoutedEventArgs e) 
Private Sub RejectButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) 
End Sub 

See Also

In this article
Not finding the help you need? Improve this article