tags:

views:

29

answers:

1

Hello...

I need a datatable in order to display the data at a WPF datagrid augmented by some generated data. But i also need to load the data from the database to local C# objects because the classes that represent tha data do many calculations .

So what is better? Depend only at datatable ? Or have the data both in objects and datatable?

+1  A: 

You may adopt following startegy

If you maintaining two sets of data (one in data table and another in C # class objects, you need to manually synchronize data.)

What you can do is create a class which will bring all the columns which needs to show on grid than create a List of this class and bind the data in grid.

in this way , you will be able to avoid duplication of your model as well as manully synchronization between sets of data.

saurabh
How to create this class? If you could a small example.. Also WPF datagrid NET 3.5 is a bit weird
Parhs