Telerik blogs

In the context of our 30th release I am happy to share even more good news with you. With the official Q1 2011 release we have enriched the developer toolbox with the new RadDataForm.In the tradition of our existing data-aware controls such as RadGridVIew, RadDataForm deals with data in easy and intuitive  way. It provides complete CRUD support over an object or a collection of objects taking care of adding, editing, deleting and navigation trough collections. We had the RadGridView to take care of tabular views and now we have RadDataForm to take care of scenarios where form layout is more suitable. RadDataForm shares a common data engine with the rest of our data-aware controls thus providing flexibility and scalability.

From the very first moment after the release I keep getting the question – Where is the RIA services example with RadDataForm .  So with the help of the RadDomainDataSource, the BusinessApplication template in VS2010 and the good old NorthWind database I gathered a small sample app for you.

 

RadDataForm, RadDomainDataSource and RIA Services how to :

 

1. Create a standard Business Application following e.g. the steps described here. We use the customers table with editing enabled.

 

2. Add references to the following assemblies :

refs

 

3.Place RadDataForm and RadDomainDataSource  in XAML the following way :

 <Grid x:Name="LayoutRoot"> <telerik:RadDomainDataSource x:Name="customersDataSource" AutoLoad="True" QueryName="GetCustomers" > <telerik:RadDomainDataSource.DomainContext> <svc:NorthWindDomainContext /> </telerik:RadDomainDataSource.DomainContext> </telerik:RadDomainDataSource> <StackPanel x:Name="ContentStackPanel" Style="{StaticResource ContentStackPanelStyle}"> <telerik:RadDataForm Header="Customers" AutoGeneratingField="RadDataForm_AutoGeneratingField" CommandButtonsVisibility="Cancel,Commit,Edit,Navigation" EditEnded="RadDataForm_EditEnded" ItemsSource="{Binding DataView, ElementName=customersDataSource}" /> </StackPanel> </Grid>

 

4. Some code to allow submitting data to the server:

private void RadDataForm_EditEnded(object sender, EditEndedEventArgs e)
        {
            this.customersDataSource.SubmitChanges();
        }
 
And that is all ! We have a fully functional CRUD enabled application.
 
 df_demo_1 

pavelrpavlov
About the Author

Pavel Pavlov

Pavel has been part of the Progress Telerik team for five years. He has a background in various XAML technologies, including WPF, Silverlight, WinRT and UWP. He is now part of the Telerik UI for Xamarin team at Progress.

Comments

Comments are disabled in preview mode.