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

GridSettings persister

6 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
archimede
Top achievements
Rank 1
archimede asked on 30 Nov 2010, 06:17 PM
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.

6 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 02 Dec 2010, 04:41 PM
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.
0
David
Top achievements
Rank 1
answered on 27 Dec 2010, 10:18 PM
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.

0
Tsvetoslav
Telerik team
answered on 31 Dec 2010, 07:29 AM
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.
0
David
Top achievements
Rank 1
answered on 04 Jan 2011, 06:05 PM
It works if you run it in C#  but does nothing when i run it in VB

0
Veli
Telerik team
answered on 05 Jan 2011, 09:26 AM
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.
0
David
Top achievements
Rank 1
answered on 05 Jan 2011, 06:01 PM
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 !
Tags
Grid
Asked by
archimede
Top achievements
Rank 1
Answers by
Veli
Telerik team
David
Top achievements
Rank 1
Tsvetoslav
Telerik team
Share this question
or