I need to create an application that displays data from a number of different sources (real-time data feeds and static data from a database). Primarily the app needs to cover these requirements:
- Display the data in a grid, with realtime updates (to the existing data and to add new rows)
- Format data accoringly (if x is less than y then highlight the cell yellow; flash on update etc)
The structure of the grid should be defined by xml, i.e. overly simplified:
<col name="Col1" source="DB" col="my_col" type="String"> <col name="Col2" source="RealTimeFeed" rtfield="MY_FIELD" type="Double">
I can write the handlers for the data sources, but since I'm new to c# I'm having a bit of trouble to decide the Data Model, in particular to make it easy to display on a DataGrid.
I see that a DataGrid can display an array of objects, provided they have properties for the columns to display. Is this the best thing to use, bearing in mind I won't know the properties of a row until I read the XML file? (i.e. in this case, I find I have a String column Col1 from the Db and Col2 from the real-time feed.)
Or could I somehow create and manipulate a DataSet from scratch and bind that to the grid? (any examples of doing this would be really helpful)
Thanks in advance for your help. I appreciate this is a rather open ended question...
RH