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

[Solved] Error Thrown when Applying Themes on RadGrid

3 Answers 137 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Richard
Top achievements
Rank 1
Richard asked on 06 May 2009, 12:07 AM

I’m having issues when trying to apply a theme to your RadGrid control.  The error I’m getting is as follows:

Sys.InvalidOperationException: Invalid XAML for control ‘XAML1’. [] (line 1, col 888): Unknown attribute TextWrapping on element AlignmentContentPresenter.

Please note that this error does not appear when no themes are set.

I have successfully applied themes to all your other controls, it’s just the RadGrid that’s causing some troubles.  Any help would be greatly appreciated.

3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 07 May 2009, 10:09 AM
Hi Richard,

I would need some more information in order to try to reproduce the problem that you have described. 
A sample project would really help to figure out the problem easily but in case that is not feasible could you share more information about your scenario? Are you using a custom theme or one of our build-in themes? Are you using the StyleManager or you are setting an application theme?

Kind regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Richard
Top achievements
Rank 1
answered on 07 May 2009, 03:50 PM

Thanks for your response,

I am trying to use one of the built in themes, more specifically, Vista.  This issue appears when I insert

 

StyleManager.ApplicationTheme = ThemeManager.FromName("Vista");  

In the application constructor, or

controls:StyleManager.Theme="Vista" 


directly in the grid view tag.  My project requires me to create dynamic columns to form a variant of a pivot table.  The cell template for these columns looks something like this

 

<telerikGridView:GridViewColumn.CellStyle> 
    <Style TargetType="telerik:GridViewCell">  
        <Setter Property="Template">  
            <Setter.Value> 
                <ControlTemplate TargetType="telerik:GridViewCell">  
                    <Border x:Name="brdCellTemplate" BorderThickness="{TemplateBinding BorderThickness}"   
                        BorderBrush="{TemplateBinding BorderBrush}"   
                        Background="{TemplateBinding Background}">  
                        <!-- Cell User control goes here --> 
                    </Border> 
                </ControlTemplate> 
            </Setter.Value> 
        </Setter> 
    </Style> 
</telerikGridView:GridViewColumn.CellStyle>


On the RowLoaded event I insert a user control that is bound to the index of the dynamic column and the row item which allows me to obtain data specific to that column from my business object.

 

Please let me know if you need further details.

0
Milan
Telerik team
answered on 12 May 2009, 08:40 AM
Hi Richard,

I was not able to reproduce the exception. Here is the application that I have used to try to reproduce the problem. Have you tried using our Latest Intenal Builds binaries which are available in our download section under Rad Controls For Silverlight -> Latest Internal Build. Updating your bindaries might solve the problem.
If the problem persists I will appreciate it if you could send us a project where the issue is observable.

All the best,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Richard
Top achievements
Rank 1
Answers by
Milan
Telerik team
Richard
Top achievements
Rank 1
Share this question
or