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

Save/Load PivotGrid State in MSSQL database

10 Answers 197 Views
Persistence Framework
This is a migrated thread and some comments may be shown as answers.
Yohan
Top achievements
Rank 2
Yohan asked on 13 Feb 2014, 11:12 AM
Hello,

I'm currently trying to save and load the current selected state of pivot grid in MSSQL database. I've managed to get mentioned functionality working although noticed that Persistence Framework fail to load the persisted view on get request (fields not getting added to grid when loading the persisted view on get request), It only work on post request. Is this a limitation of Persistence Framework? is this achievable? I have attached my sample project (rename the extension as rar).

Steps to reproduce :

1) set some fields on pivot grid using configuration panel.
2) persist the selected view using save  button.
3) press "F5" and refresh the browser.
4) Press "load" button to reload the persisted view.

Thanks and Regards,
Yohan

10 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 18 Feb 2014, 08:49 AM
Hi Yohan,

You can see what RadPersistenceFramework supports of PivotGrid in this help topic:
http://www.telerik.com/help/aspnet-ajax/persistence-framework-supported-controls.html

I would recommend you to debug your load function in your StorageProvider, and see if it returns the correct values. You use "where id = @id" in your SQL query, and the ID is always 1 in your code, and this seems a bit odd for me. If the ID does not match, it will return null.

Regards,
Vasil
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Yohan
Top achievements
Rank 2
answered on 19 Feb 2014, 04:49 AM
Hello Vasil ,

I've hard-corded ID value in that sample project where it will always show the initially saved view.  Any how you can use a TextBox to get the ID value when loading preserved view so then it will allow you to get the expected. My concern is that it doesn't work on get request and this is not due to null values, I've debugged the sample project which I've sent and there i get the "serializedState" string when i load the view in get request although it doesn't load the fields to pivot grid. Can you please try out the mentioned scenario so then you can get an idea of what i'm saying. does it only save "FieldSettings" but not field objects? 

Thanks and Regards,
Yohan


0
Vasil
Telerik team
answered on 23 Feb 2014, 05:11 PM
Hi Yohan,

That is correct, it persist the settings of the fields. The settings can be loaded only if such fields exist. As we constantly do improvements on the persistence framework and the PivotGrid, we will try to make adding the fields automatically when there are such stored settings for them.

Regards,
Vasil
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Mohamad
Top achievements
Rank 1
answered on 27 May 2014, 07:13 AM
Save/Load PivotGrid State in MSSQL database

can you please give me your code because i need to save/load pivot sate in mssql db
0
Vasil
Telerik team
answered on 28 May 2014, 02:21 PM
Hi Mohamad,

You can find sample code in this demo:
PersistenceFramework - Persisting RadPivotGrid Settings

Regards,
Vasil
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Vasil
Telerik team
answered on 28 May 2014, 02:24 PM
Hi Mohamad,

You can find sample code in this demo:
PersistenceFramework - Persisting RadPivotGrid Settings

Regards,
Vasil
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mohamad
Top achievements
Rank 1
answered on 29 May 2014, 08:03 AM
i want save it in our database for more than one users/Groups

so how can i get RadPersistenceManager value and set value

i'm using GridSettingsPersister class to save radGrid settings 

do you have class to save pivot settings ?

and i have Q1 2014 but i can't support Arabic language

can you help me plz ? 
0
Vasil
Telerik team
answered on 03 Jun 2014, 08:12 AM
Hello Mohamad,

We does not support the old persisting class for RadGrid, that was showed in our demos, since the release of the RadPersistenceFramework. The pivot grid has too complicated internal structure to be persisted using sample save/load settings into the code-behind.

Could you share more details about the problem with the Arabic language. I will test it here if you give me sample configuration and tell you what further you can do to resolve it.

Regards,
Vasil
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mohamad
Top achievements
Rank 1
answered on 07 Jun 2014, 03:03 PM
hello

this is the error

An item with the same key has already been added.

when using Arabic language

select  EID as [رقم الموظف],Department as [الدائرة]  from dbo.Pay_EmployeesGeneralInfo

0
Vasil
Telerik team
answered on 12 Jun 2014, 07:54 AM
Hi Mohamad,

The provided information is not enough for us to replicate the issue. I could only say that the spaces inside the column names are problems. If you have columns that have spaces, please ensure to set UniqueName to your columns without spaces. Several releases back there was a problem with the AutoGenerated columns. The problem was that the auto-generated unique names did contain spaces from the original data column names.

Regards,
Vasil
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Persistence Framework
Asked by
Yohan
Top achievements
Rank 2
Answers by
Vasil
Telerik team
Yohan
Top achievements
Rank 2
Mohamad
Top achievements
Rank 1
Share this question
or