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

RadGridView fails when specifying StyleManager.Themes

4 Answers 120 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark Wells
Top achievements
Rank 1
Mark Wells asked on 27 Jul 2010, 12:39 AM
Hi,

I am getting an error when specifying the StyleManager.Themes property in the RadGridView. I was not getting this before but I did obtain the dll's for 2010.2.714.1030. This problem is happening with this set of dll's. I would really like to make it work with this set because it contains a fix that I have been waiting months for telerik to fix.

I have attached a screen shot of the error. I also have a mini project that demonstrates the error, but it should be sufficient to just include the below code to re-create, since the code is very basic. All you have to do is try and run it to get the error.

<UserControl x:Class="TreeListColumns.MainPage"
             xmlns:gridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:nav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" >
    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <DataTemplate x:Key="template">
                <TextBlock Text="{Binding Name}" />
            </DataTemplate>
        </Grid.Resources>
              
        <telerikGridView:RadGridView x:Name="gvResultList" IsFilteringAllowed="False" GridLinesVisibility="Both" Height="450" ScrollViewer.VerticalScrollBarVisibility="Visible" IsReadOnly="True" Width="950" AutoGenerateColumns="False" telerik:StyleManager.Theme="Office_Silver">
            <telerikGridView:RadGridView.Columns>
                <telerikGridView:GridViewDataColumn Width="97" >
                    <telerikGridView:GridViewDataColumn.CellStyle>
                        <Style TargetType="gridView:GridViewCell">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="gridView:GridViewCell">
                                        <StackPanel Orientation="Horizontal" Margin="2,2,2,2">
                                            <HyperlinkButton x:Name="GotToPerson" TargetName="_blank" NavigateUri="{Binding ClientKey, Converter={StaticResource uriConverter}}" Foreground="Black">
                                                <HyperlinkButton.Content>
                                                    <TextBlock Text="{Binding ViewClient, Source={StaticResource LocStrings}}" TextDecorations="Underline" />
                                                </HyperlinkButton.Content>
                                            </HyperlinkButton>
                                        </StackPanel>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </telerikGridView:GridViewDataColumn.CellStyle>
                </telerikGridView:GridViewDataColumn>
                <telerikGridView:GridViewDataColumn UniqueName="ClientName" Width="270" />
                <telerikGridView:GridViewDataColumn UniqueName="ClientGender" Width="270" />
                <telerikGridView:GridViewDataColumn UniqueName="ClientBirthDate" Width="270" DataMemberBinding="{Binding ClientBirthDate}" DataFormatString="{}{0:MMMM dd, yyyy}" />
            </telerikGridView:RadGridView.Columns>
  
        </telerikGridView:RadGridView>
    </Grid>
</UserControl>

Thanks,

Mark

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 27 Jul 2010, 10:21 AM
Hello Mark Wells,

We have prepared a sample project with the code that you supplied but we are not getting any error. I have attached the sample project. Can you modify it so that it displays the error. Thanks in advance.

P.S. Do you have a reference to the theme assembly?

All the best,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mark Wells
Top achievements
Rank 1
answered on 27 Jul 2010, 04:26 PM
Hi Ross,

The sample project you sent uses the Telerik dll's for Silverlight 4 (2010.2.714.1040). I want to use the Silverligt 3 dll's that Telerik provides for download (version 2010.2.714.1030).

Yes, I do have a reference to the Theme dll (Telerik.Windows.Themes.Office_Silver.dll)

Please try again with the Silverlight 3 dll's.

Thanks,

Mark
0
Accepted
Rossen Hristov
Telerik team
answered on 28 Jul 2010, 09:25 AM
Hello Mark Wells,

I have updated the same project to use the SL3 assemblies. But I am still not getting any error. What am I doing wrong? Please, find the project attached.

Best wishes,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mark Wells
Top achievements
Rank 1
answered on 28 Jul 2010, 06:43 PM
Ok, so I replaced the dll's in my project with the ones that you provided in your sample project. It finally works!!!!!

And the bugs in the Telerik controls that I have been chasing after since March are now all fixed. It has been a long haul......

Thanks very much,

Mark
Tags
GridView
Asked by
Mark Wells
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Mark Wells
Top achievements
Rank 1
Share this question
or