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

Ability to ignore controls?

2 Answers 16 Views
PersistenceFramework
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 13 Jul 2017, 06:05 PM

Hello,

Can you place a setting or property on certain controls to have them ignored during the saving/restoring using the PersistenceFramework?

We use the PersistenceFramework mainly for saving a RadDock layout. Within this RadDock contains a control which contains a RadMenu. The headers of some of the RadMenuItems are dynamic based on what you last clicked. The layout restore is wiping away the current header (or state) and applying the one saved within the PersistenceManager stream. This appears to the user that the UI is in a bad state as it's incorrectly stating what you last clicked.

Can this easily be stopped or ignored, at least on RadMenus?

Thank you,

Patrick

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 17 Jul 2017, 10:45 AM
Hello Patrick,

There are couple of feature of the persistence framework that I can suggest you in order to achieve your requirement. The first one is to use Serialization Options. Read more about this in the corresponding help article. The second approach is to use a custom property provider. In both cases you can avoid the serialization of the property that holds the menu. 

Regards,
Martin Ivanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Patrick
Top achievements
Rank 1
answered on 17 Jul 2017, 06:01 PM

Thank you for the direction Martin!

 

This worked very nicely.

<telerik:PersistenceManager.SerializationOptions>
    <telerik:SerializationMetadataCollection>
        <telerik:PropertyNameMetadata Condition="Except" Expression="Child" SearchType="PropertyName" />
    </telerik:SerializationMetadataCollection>
</telerik:PersistenceManager.SerializationOptions>
Tags
PersistenceFramework
Asked by
Patrick
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Patrick
Top achievements
Rank 1
Share this question
or