Hey,
I need to fill a DataGrid through an ObservableCollection. The ObservableCollections holds a class which implements the different kinds of Parameters, which are binded to the DataGridColumns.
My Problem is, the user can vary the number of properties (and hence the number of columns) dynamicly. The most expensive Count of columns can be over 600, but i think, no user will do that and so, i can not create a class, which implements the max Count for Parameters for over 600 variables. As much more the average count will be not more as ten.
So, i try to think over an solution to completly create my own collection, which can be set as ItemSource to my ListView and try to find a way to alter the number of Parameters due to the number at runtime, without overusing the Memory.
Means exactly, is there a way , to creates Parameters inside a custom collection during runtime in the meaning of the former meantioned implementation? The effect should be, that the size of the collection should never be greater as the used Count of Parameters, but should be extenable to the Maximum number of Parameters.
By the way, maybe one aspect could spare all the effort. If i would create all 600 paramters inside a class (which i would use as the filling Element of the ObservableCollection), will the System and Memory reckognize all 600 although i only give 10 a value at runtime? And if so, which forms of writing are neccessary to let them stay at their system-Zero Point?
Thanks that you have read all this, bye