Save/Load PivotGrid State in MSSQL database

10 posts, 0 answers
  1. Yohan
    Yohan avatar
    32 posts
    Member since:
    Jan 2014

    Posted 13 Feb 2014 Link to this post

    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
  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 18 Feb 2014 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Yohan
    Yohan avatar
    32 posts
    Member since:
    Jan 2014

    Posted 18 Feb 2014 in reply to Vasil Link to this post

    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


  5. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 23 Feb 2014 Link to this post

    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.
  6. Mohamad
    Mohamad avatar
    3 posts
    Member since:
    May 2014

    Posted 27 May 2014 Link to this post

    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
  7. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 28 May 2014 Link to this post

    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.

     
  8. Mohamad
    Mohamad avatar
    3 posts
    Member since:
    May 2014

    Posted 29 May 2014 in reply to Vasil Link to this post

    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 ? 
  9. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 03 Jun 2014 Link to this post

    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.

     
  10. Mohamad
    Mohamad avatar
    3 posts
    Member since:
    May 2014

    Posted 07 Jun 2014 in reply to Vasil Link to this post

    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

  11. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 12 Jun 2014 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017