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

GridView implicit style on Load not applied

2 Answers 70 Views
PersistenceFramework
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 16 Jul 2013, 09:24 PM
Hello.
We have a RadDocking control with multiple RadPanes in a RadPaneGroup.  Each RadPane contains a GridView.  We have an implicit style which works as expected.  The RadPanes are dynamically added to the RadPaneGroup on demand by the user.  Each time a RadPane is added the GridView is styled correctly.

When we implemented the PersistenceFramework we ran into an issue where the RadPane which is selected upon start-up gets the default style applied.  If I create a new RadPane it will be styled correctly as described.  I then save my layout and terminate the application.  When I start the application and we call  LoadLayout on the GridView and Load on the PersistenceManager.  And again that RadPane which is selected will have the default style applied to the GridView while the other RadPanes have the implicit style applied.

What would be a reason for this?

Thanks
Paul

2 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 19 Jul 2013, 03:30 PM
Hello Paul,

As far as I understand your scenario, you have difficulties in loading the Style property of the RadGridView control. Also, I understand that you are using our implicit styles. This is why we suggest you to try not to persist the Style property. By doing so, when you load the control the implicit styles will take place and the style will be applied correctly. In order to follow this approach you can take a look at this article.

Basically you can use this code:

<telerik:RadGridView>
    <telerik:PersistenceManager.SerializationOptions>
        <telerik:SerializationMetadataCollection>
        <telerik:PropertyNameMetadata Condition="Except" Expression="Style" SearchType="PropertyName" />
    </telerik:SerializationMetadataCollection>
 </telerik:PersistenceManager.SerializationOptions>
...
</telerik:RadGridView>
Please give this approach a try and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Paul
Top achievements
Rank 1
answered on 26 Aug 2013, 02:34 PM
The issue was resolved by setting the ApplicationTheme in the StyleManger.
Tags
PersistenceFramework
Asked by
Paul
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Paul
Top achievements
Rank 1
Share this question
or