This is a migrated thread and some comments may be shown as answers.

How to apply a theme to RadGrid

1 Answer 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dan Harvey
Top achievements
Rank 2
Dan Harvey asked on 31 Mar 2011, 07:20 PM
Hello,

I cannot figure out how to apply a theme to the radgrid.  It is done so easily in this example, however it is not apparent how it is done.

http://demos.telerik.com/silverlight/#GridView/Theming

I just want my grid to look like it does in the above example when "Office_Blue" is selected.

How do I achieve this?

This is my grid:

Thanks,

<UserControl x:Class="MyNamespace" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d"
             xmlns:vm="clr-namespace:MyNamespace"
             d:DesignWidth="640" 
             d:DesignHeight="480" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" >
  
    <UserControl.Resources>
        <vm:ViewModel x:Key="ViewModel"></vm:ViewModel>
    </UserControl.Resources>
  
    <Grid x:Name="LayoutRoot" DataContext="{StaticResource ViewModel}" >
  
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
  
        <telerik:RadGridView x:Name="dgClasses"
                             Grid.Row="1"
                             AutoGenerateColumns="False"
                             ItemsSource="{Binding All}"                             
                             RowDetailsTemplate="{StaticResource AllSe}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewToggleRowDetailsColumn></telerik:GridViewToggleRowDetailsColumn>
                <telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Button x:Name="btnSave" Height="20" Width="100" Command="{Binding SaveCommand}">
                                <TextBlock><Run Text="Update" /></TextBlock>
                            </Button>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Button x:Name="btnDelete" Height="20" Width="100" Command="{Binding DeleteCommand}">
                                <TextBlock><Run Text="Delete" /></TextBlock>
                            </Button>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="C" DataMemberBinding="{Binding C}" IsReadOnly="False" />
                <telerik:GridViewDataColumn Header="T" DataMemberBinding="{Binding T}" IsReadOnly="False" />
                <telerik:GridViewDataColumn Header="E" DataMemberBinding="{Binding E}" IsReadOnly="False" />
                <telerik:GridViewDataColumn Header="N" DataMemberBinding="{Binding N}" IsReadOnly="False" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
  
    </Grid>
  
</UserControl>

1 Answer, 1 is accepted

Sort by
0
Dan Harvey
Top achievements
Rank 2
answered on 31 Mar 2011, 08:12 PM
Tags
GridView
Asked by
Dan Harvey
Top achievements
Rank 2
Answers by
Dan Harvey
Top achievements
Rank 2
Share this question
or