3 Answers, 1 is accepted
0
Accepted
Hi Sanjay,
You can use RadPersistenceFramework to achieve this requirement:
https://demos.telerik.com/aspnet-ajax/pivotgrid/examples/applicationscenarios/persisting-radpivotgrid-settings/defaultcs.aspx
I hope this will prove helpful.
Regards,
Eyup
Progress Telerik
You can use RadPersistenceFramework to achieve this requirement:
https://demos.telerik.com/aspnet-ajax/pivotgrid/examples/applicationscenarios/persisting-radpivotgrid-settings/defaultcs.aspx
I hope this will prove helpful.
Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
sanjay
Top achievements
Rank 1
answered on 07 Feb 2019, 01:03 PM
Ya it worked for me. Now i can save and retrieve the Pivotgrid settings from the database.
Thanks.
1
Fernando
Top achievements
Rank 2
Iron
answered on 11 Apr 2023, 10:14 PM
| edited on 11 Apr 2023, 10:15 PM
RadPersistenceManager1.StorageProviderKey = lblReportId.Text
RadPersistenceManager1.LoadState()
or
RadPersistenceManager1.StorageProviderKey = lblReportId.Text
RadPersistenceManager1.SaveState()
-------------------------------
Public Sub SaveStateToStorage(key As String, serializedState As String) Implements IStateStorageProvider.SaveStateToStorage
Try
LocalAPI.SavePersistenceManagerSetting(key, serializedState)
Catch ex As Exception
Dim e1 As String = ex.Message
End Try
End Sub
Public Function LoadStateFromStorage(key As String) As String Implements IStateStorageProvider.LoadStateFromStorage
Try
Return LocalAPI.LoadPersistenceManagerSetting(key)
Catch ex As Exception
Dim e1 As String = ex.Message
End Try
End Function
--------------------------------
Region "PersistenceManager"
Public Shared Function LoadPersistenceManagerSetting(key As String) As String
' key format: Id
Dim ResXML As String
Try
Return GetStringEscalar($"select [Value] from Employees_PersistenceManagerSettings where Id={key}")
Catch ex As Exception
Throw ex
End Try
End Function
Public Shared Function SavePersistenceManagerSetting(key As String, serializedState As String) As String
Try
' key format: Id
ExecuteNonQuery($"UPDATE [Employees_PersistenceManagerSettings] SET [Value]='{serializedState}' WHERE [Id]={key}")
Catch ex As Exception
Throw ex
End Try
End Function
#End Region
RadPersistenceManager1.LoadState()
or
RadPersistenceManager1.StorageProviderKey = lblReportId.Text
RadPersistenceManager1.SaveState()
-------------------------------
Public Sub SaveStateToStorage(key As String, serializedState As String) Implements IStateStorageProvider.SaveStateToStorage
Try
LocalAPI.SavePersistenceManagerSetting(key, serializedState)
Catch ex As Exception
Dim e1 As String = ex.Message
End Try
End Sub
Public Function LoadStateFromStorage(key As String) As String Implements IStateStorageProvider.LoadStateFromStorage
Try
Return LocalAPI.LoadPersistenceManagerSetting(key)
Catch ex As Exception
Dim e1 As String = ex.Message
End Try
End Function
--------------------------------
Region "PersistenceManager"
Public Shared Function LoadPersistenceManagerSetting(key As String) As String
' key format: Id
Dim ResXML As String
Try
Return GetStringEscalar($"select [Value] from Employees_PersistenceManagerSettings where Id={key}")
Catch ex As Exception
Throw ex
End Try
End Function
Public Shared Function SavePersistenceManagerSetting(key As String, serializedState As String) As String
Try
' key format: Id
ExecuteNonQuery($"UPDATE [Employees_PersistenceManagerSettings] SET [Value]='{serializedState}' WHERE [Id]={key}")
Catch ex As Exception
Throw ex
End Try
End Function
#End Region