Telerik UI for Windows 8 XAML

The DataGridNumericalColumns is used to represent only numerical values. It uses the RadNumericBox control to pick a value in EditMode.

Example

The following example shows how to generate DataGridNumericalColumns manually:

XAML Copy imageCopy
<telerikGrid:RadDataGrid UserEditMode="Inline" ItemsSource="{Binding}" AutoGenerateColumns="False" Height="250" Width="300">
    <telerikGrid:RadDataGrid.Columns>
        <telerikGrid:DataGridTextColumn PropertyName="Product" Header="Product"/>
        <telerikGrid:DataGridNumericalColumn PropertyName="Amount" Header="Amount"/>
    </telerikGrid:RadDataGrid.Columns>
</telerikGrid:RadDataGrid>
Numerical Column
Numerical Column Edit Mode

We have also used the PropertyName property to associate each column with the relevant property from our model.

Here's the data:

C# Copy imageCopy
this.DataContext = new List<Data>()
{
    new Data { Product = "Jacket",  Amount = 5},
    new Data { Product = "Jeans",   Amount = 3},
    new Data { Product = "T-Shirt", Amount = 5},
    new Data { Product = "Socks",   Amount = 10}
};

Data is our custom class:

C# Copy imageCopy
public class Data
{
    public string Product { get; set; }
    public int Amount { get; set; }
}