For example, i have a class (User) and 30 values (properties), 10 of them i display in DataGridView as columns, but other (settings for each user (timeout to make requests for example, any other BL values)) about 20 values, i just want to store together in XML file (i could make Serialize/Deserialize).
So, i need to store anywhere this not displayed 20 values, what is the best practise for this?
Is it hidden column in DataGridView or anything else?
As i could understand, i have to store it together, but where i could do it? Should i make relationship between two block of stored data (User[10 values] + User[20 values]) to make them after that serialize in XML?
The best practice as I have used frequently, is to retrieve all your data in a collection like
List, DataTable, EntityCollection, ...or anyIEnumerableType and bind it to yourDataGridViewwhich hasAutoGenerateColumns = false. In this case you should have manually added the specific columns to theDataGridViewin designer or code. The code approach would be like this: