New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

State Persister Base Abstract class. Should be implemented for each control. ReadSettings / ApplySettings methods can be generated with T4 Template

Definition

Namespace:Telerik.Web.UI.PersistenceFramework

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public abstract class RadStatePersister : IStatePersister

Inheritance: objectRadStatePersister

Implements: IStatePersister

Inherited Members object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

Initialize a new instance of the RadStatePersister class

C#
public RadStatePersister()

Initialize a new instance of the RadStatePersister class using specified IStateStorageProvider and IStateSerializer to be utilized for the state persistence

C#
public RadStatePersister(IStateStorageProvider storageProvider, IStateSerializer stateSerializer)
Parameters:storageProviderIStateStorageProviderstateSerializerIStateSerializer

Fields

C#
protected RadControlState currentState

Methods

Applys the control's settings. This method will be generated using T4 Template.

C#
public virtual void ApplySettings(Control ctrl)
Parameters:ctrlControl

Implements: IStatePersister.ApplySettings(Control)

Loads the state to the provided control

C#
public void LoadState(Control ctrl, RadControlState state)
Parameters:ctrlControl

Control that should receive the provided state

stateRadControlState

RadControlState instance that will be applied to the provided control

Implements: IStatePersister.LoadState(Control, RadControlState)

This method should raise StateLoading event

Loads the state to the corresponding control using the assigned StateSerializer and StateStorageProvider

C#
public void LoadState(Control ctrl, string key)
Parameters:ctrlControl

RadControl instance which state should be loaded

keystring

The indentifier under which the state is saved.

Implements: IStatePersister.LoadState(Control, string)

This method should be usable only when StateSerializer and StateStorageProvider are assigned to the StatePersister.

This method should raise StateLoading event

Reads the control's settings.

C#
public virtual void ReadSettings(Control ctrl)
Parameters:ctrlControl

Implements: IStatePersister.ReadSettings(Control)

Saves the state of the corresponding control using the assigned StateSerializer and StateStorageProvider

C#
public void SaveState(Control ctrl, string key)
Parameters:ctrlControl

RadControl instance which state should be saved

keystring

The indentifier under which the state will be saved.

Implements: IStatePersister.SaveState(Control, string)

Raises StateSave event

Saves the state of the corresponding control using the assigned StateSerializer and StateStorageProvider

C#
public void SaveState(Control ctrl)
Parameters:ctrlControl

RadControl instance which state should be saved

Raises StateSave event

Events

C#
public event StateLoadEventHandler StateLoad
C#
public event StateSaveEventHandler StateSave