Edit this page

SaveSettings event

SaveSettings is a server-side event that fires after calling SaveState() method of RadPersistenceManager but before actually writing the settings using the chosen provider so the user can prevent any of these from saving in the corresponding storage.

The example below demonstrates how to remove a grid settings before saving the state.

protected void RadPersistenceManager1_SaveSettings(object sender, PersistenceManagerSaveAllStateEventArgs e)
{
    var gridSetting = e.Settings.FindByUniqueId("RadGrid2");
    if (gridSetting != null)
    {
        e.Settings.RemoveByUniqueId("RadGrid2");
    }
}
Protected Sub RadPersistenceManager1_SaveSettings(sender As Object, e As PersistenceManagerSaveAllStateEventArgs)
    Dim gridSetting = e.Settings.FindByUniqueId("RadGrid2")
    If gridSetting IsNot Nothing Then
        e.Settings.RemoveByUniqueId("RadGrid2")
    End If
End Sub

See Also