Version

Persistence Settings

You can configure which of your control’s properties are persisted through the Infragistics Persistence Framework™ by saving all properties or specific properties or ignoring some of them. To enable such configurations, you will use the PersistenceSettings object.

The PersistenceSettings object’s SavePersistenceOptions and LoadPersistenceOptions properties allow you to specify which of the control’s settings are saved and loaded.

The two persistence options are AllButIgnored and OnlySpecified.

  • When the option AllButIgnored is set, all control’s properties are saved or loaded except the properties marked to be ignored.

  • When the option OnlySpecified is set, only the specified properties are saved or loaded.

You can identify a property by its name and create a PropertyNamePersistenceInfo object.

The PropertyNamePersistenceInfo object’s Options property defines how the property name is searched.

Options are:

  • PropertyName - looks for the specified name

  • PropertyPath - looks for the specific name in the property path

  • Contains – looks in the property path and check if the name is in there

A property or a list of properties can be distinguished by type also. In this case you will use the PropertyTypePersistenceInfo object.

Related Topics