views:

94

answers:

1

Hi,

I have some tab controls on a windows form. For each of these tabs I might want to be able to sort by the column header, apply a filter, change the order that the columns are displayed in, and also add additional columns from a predetermined list.

The question I have is using Windows Form (Current Implementation) or making the tab controls WPF and embedding them in the Windows Form, how could I implement a feature such as remebering the users state of each tab, when i.e. they have changed the order of columns, have this persisted when they leave the form and when they reopen it, for the changes be applied to the control.

I know there is a similar profile framework in ASP.NET but is there a similar thing for Windows Forms/WPF.

I am currently in .NET 3.5 with a view to moving to .NET 4.0 soon. The code base is C#

If anyone has a link to any articles or suggestions I would be very grateful.

Cheers

A: 

I did something similar in a project that I once worked on where I had various tabs. In each tab was a grid, and the spec mandated that column size and order must be saved per user.

What I ended up doing is having a settings class which wrapped XML for each user. The XML contained a hierarchical structure indicating which tab had which columns, in which order, and how wide the columns were expanded etc.

This XML was saved to the database, so anytime the user logged onto the system from any machine their previous layout would be retained.

Software.Developer