GridSettings persister

7 posts, 0 answers
  1. archimede
    archimede avatar
    103 posts
    Member since:
    Jul 2006

    Posted 30 Nov 2010 Link to this post

    Hello,
    I'd like to save with GridSettingsPersister http://demos.telerik.com/aspnet-ajax/grid/examples/programming/savinggridsettingsonperuserbasis/defaultcs.aspx the settings of a radgrid.

    Is it possible to save also the filter width? How?

    It is possible to save the column width without the automatic resize of grid's width shown in the example. I want the grid to be scrolled beyond the viewed part.
  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 02 Dec 2010 Link to this post

    Hello archimede,

    The GridSettingsPersister class demonstrated in the example you are referring to does not automatically persist the filter control width. You will have to extend the class to implement support for this. The column width is persisted automatically.

    Greetings,
    Veli
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David
    David avatar
    77 posts
    Member since:
    Apr 2008

    Posted 27 Dec 2010 Link to this post

    I can't even get the Demo to work,

    http://demos.telerik.com/aspnet-ajax/grid/examples/programming/savinggridsettingsonperuserbasis/defaultcs.aspx

    I save user 1 and it sets the exact same thing for User2 and User3.

    There is nothing different about them.

  5. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 31 Dec 2010 Link to this post

    Hello archimede,

    The online example in question is designed to work as follows: when you select a user from the combo box the web form remembers what use has been selected but does not automatically load the grid settings for that use. In order to do so, you need to press the Load Settings button. If you need the grid settings to automatically load on post back from the user combo, just implement the following steps:

    1. When the page initially loads, persist the grid settings into a session variable with a key name chosen by you, e.g. Session["DefaultUser"] = SavePersister.SaveSettings();

    2. When you change the user from the drop-down, check if such a user key exists in the Session collection. If not, load the settings for the DefaultUsert.

    Hope it helps.

    All the best,
    Tsvetoslav
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. David
    David avatar
    77 posts
    Member since:
    Apr 2008

    Posted 04 Jan 2011 Link to this post

    It works if you run it in C#  but does nothing when i run it in VB

  7. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 05 Jan 2011 Link to this post

    Hi David,

    The VB.NET example had a single RadGrid1.Rebind() statement missing in the Button2_Click method (after LoadPersister.LoadSettings(settings)). We will update the demo for an upcoming release.

    Veli
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  8. David
    David avatar
    77 posts
    Member since:
    Apr 2008

    Posted 05 Jan 2011 Link to this post

    Yes !  i did get it working in VB with the same rebind.

     I started another thread going in more detail on this one.
    http://www.telerik.com/community/forums/aspnet-ajax/grid/379068-gridsettingspersister.aspx

    As usual -the simplest things sometimes take the longest.


    Thanks for checking that out !
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017