So, there's lot of events, lot of cost types, and some events have some
costs equal to 'value'.
Actually it's just two tables with many-to-many relationship resolved
by an association table.

Now, I'd like to build a form to display this data in a tabular manner:

cost1 cost2 cost3
event1 13$ 45$

event2 5$

event3 15$

event4 4$

The question is: how can I do it with GridView and ObjectDataSource
duo?

I guess it's quite problematic, since such table could not be the
output of any single SELECT query (right?).

What my vague intuitions tell is that it could work by using some
business object EventCosts that would have access to all three tables
(by some TableAdapters?) and using this information it could fill, cell
by cell, some data structure that could feed the webform. If there
exist EventCost which has relationship to given cost and given event,
its value would be filled in intersection of their column/row.

Unfortunately the columns number could easily change (by adding new
cost) so would it be possible to use typed dataset to exchange
information between biz object and GridView?

I know it all may look very vague, but I would be very gratefull if
yanybody could sketch the optimal structure, or just the approach, for
solving this problem (I ask about dataset, but I not sure of the rest
either). I'm sure it will help me a lot to understand those basic net
2.0 concepts.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!