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

Persisting Grid Settings : how to save setting when change occurs at the grid

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rémy
Top achievements
Rank 1
Rémy asked on 19 Nov 2012, 09:03 PM

Hi,

I'm working on saving setting made by a user directly after the event. Exemple: i have a column A and a column B. My user take the column B and put it before the column A, so I've change the order of my two columns, and the setting are saved in my DB. I've try with :

Public Sub tmpGrid_Load(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim tmpGrid As RadGrid = sender
 
    If tmpGrid.Page.IsPostBack Then
        Dim setting As New GridSettingsPersister(tmpGrid)
        Dim param As String = setting.SaveSettings()
    End If
End Sub

The code execute, SaveSettings execute correctly, but the change at screen is made after the event after when I reload my page, my setting are not correct. It's always save all my change but not the last. Exemple: My original order is A-B-C, I put C before A (C-A-B), and after, i put B before C (B-C-A). I quit the page, and I return on the same page after. What I see is C-A-B, not B-C-A. 

I've try with the event ColumnReorder, but the same problem occurs. I see that the event execute after my save is made. So how can I do the save after the event. I don't want that my user need to do something to save their setting.

Thank you


Visual studio 2008 .NET 3.5 SP1
Windows 7
Telerik ASP.NET AJAX 2012.1.301.2
VB.NET

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 22 Nov 2012, 04:24 PM
Hello Rémy,

Please test the attached demo and then let me know if it works properly on your end.

Kind regards,
Daniel
the Telerik team
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Rémy
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or