Telerik UI for Windows 8 XAML

Getting Started

This quick start tutorial will help you setup and add a RadDataGrid DataStorage Provider control to an application. First, add a reference to the following assembly:

  • Telerik.UI.Xaml.Controls.DataProvider.dll

Important

Similar to the RadMap SDK Grid.DataStorageProvider will be platform specific (cannot be built in AnyCPU) as it consumes native code.

Alternatively, you can add a reference to RadDataGrid DataStorage Provider for Windows 8.1 XAML SDK.

XAML Copy imageCopy
<telerik:RadDataGrid x:Name="grid" UserEditMode="Inline" AutoGenerateColumns="False">
  <telerik:RadDataGrid.Columns>
    <telerik:DataGridTextColumn PropertyName="Name"/>
  </telerik:RadDataGrid.Columns>
</telerik:RadDataGrid>
C# Copy imageCopy
Context context = new Context("Example", DatabaseLocation.Local);
context.Insert(new Data { Name = "Data" });
context.SaveChanges();
grid.ItemsSource = new DataStorageItemsSource<Data>(context);
C# Copy imageCopy
public class Data
{
  [Key]
  [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  public int ID { getset; }

  public string Name { getset; }
} 

To illustrate the scenario follow the steps: 

  1. Start the application

  2. The RadDataGrid should have one item named "Data".

  3.   Edit the item and type, for example, "123".

    data Provider 1
  4. Close the application.

  5. Start the application again - the previous item is saved.

    data Provider 2