views:

61

answers:

1

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

+1  A: 

If possible, I would use VSTO and make Excel the front end. This gives users a familiar, powerful interface and eliminates a lot of work for you. It sounds like parts of the layout XML could be incorporated into an Excel template, and parts belong in the program's app.config.

Please clarify the question if VSTO is not an appropriate technology here.

RossFabricant
Thanks for the idea. We're using Excel to do this job right now! But we've found that it's not a stable enough environment (i.e. sometimes one user can't even start Excel.) When there are multiple RT events firing, thins get very unpredictable. That's why I wanted to move OUT of the Excel env :)
Ryan