Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing an desktop application in C#. The application is to be host on a server where all the users can access form one location. I need to develop the feature so that each user can customize their own gridview column order and width. so whenever they restart the application the gridview will be displayed as per pre-stored column order.

What I have tried:

i was thinking to create each user's profile which will be stored in .text file. from where we can restore the info. the Text file would be storing the columns in the order defined by user. But I need different solution.
Posted
Updated 29-Oct-19 8:57am

 
Share this answer
 
Comments
Maciej Los 29-Oct-19 5:06am    
5ed!
I'll suggest you try the winform settings, which you can access via
Settings.Default.[GRID_VIEW_COLUMN_ORDER];

You can save the order of the gridview in a List or Dictionary then tie it to the current user like below

Dictionary<string, string> gridRowOrderDictionary = new Dictionary<string, string>();
protected void gridViewRowOrderSet(object sender, EventArgs e)
{
gridRowOrderDictionary.Add("Gridorder1", "Value1");
            gridRowOrderDictionary.Add("Gridorder2", "Value2");
            gridRowOrderDictionary.Add("Gridorder3", "Value3");

Settings.Default.GridRowOrder = gridRowOrderDictionary;
}


Then u get that
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900