DataRelations ?

S

Steve

(this was a late addition to another thread, I posted it fresh as it's own
thread cause it's a different question)


OK, I have a bit of a problem here. I was reading this article here:
http://msdn.microsoft.com/msdnmag/issues/02/11/datapoints/default.aspx

And everything was sounding easy. Then I thought about how I wanted to
DISPLAY my Data VS how it's STORED in teh database.. and that is the tricky
part.
Here is a table breakdown
Tbl_Products
[ ProdId(pk) ] [ PartNum ]

Tbl_Prod_Faqs (may-to-many)
[ ProdId (fk) ] [ FaqId(fk) ]

Tbl_Faq_Main
[ FaqId(pk) ] [ CatId (fk) ] [ Question ] [ Answer ]

Tbl_Faq_Categories
[ CatId(pk) ] [ Category ]

so that seems fine to me.

I want to display it hierarchically like this:

ProductA
FaqCategory1
Faqs[]
FaqCategory2
Faqs[]

ProductB
FaqCategory1
Faqs[]
FaqCategory2
Faqs[]
FaqCategory3
Faqs[]
FaqCategory4
Faqs[]


You get the idea.

So I have a series of nested controls and I need to pass them the
appropriate data source. Using 4 tables linked with DataRelations, I don't
see how I can easily get the FaqCategories for a given product.

what do you suggest? What is the cleanest, nicest way to handle my
situation here?
 
R

Ron Allen

Steve,
Well, I'd do it with a third party grid (Infragistics UltraGrid) as a
grid with 3 'bands' and just bind the top-level table to the grid. You have
to wrap some logic for inserts to copy parent id data from the parent rows
but aside from that it should be simple. You can get a trial version from
www.infragistics.com if you want to check this out. I'm sure that the other
third party grids (such as ComponentOne's version) would handle this as
well.

Ron Allen
 
S

Steve

Thanks Ron. I'll look into some of those 3rd party solutions.


Ron Allen said:
Steve,
Well, I'd do it with a third party grid (Infragistics UltraGrid) as a
grid with 3 'bands' and just bind the top-level table to the grid. You have
to wrap some logic for inserts to copy parent id data from the parent rows
but aside from that it should be simple. You can get a trial version from
www.infragistics.com if you want to check this out. I'm sure that the other
third party grids (such as ComponentOne's version) would handle this as
well.

Ron Allen
Steve said:
(this was a late addition to another thread, I posted it fresh as it's own
thread cause it's a different question)


OK, I have a bit of a problem here. I was reading this article here:
http://msdn.microsoft.com/msdnmag/issues/02/11/datapoints/default.aspx

And everything was sounding easy. Then I thought about how I wanted to
DISPLAY my Data VS how it's STORED in teh database.. and that is the tricky
part.
Here is a table breakdown
Tbl_Products
[ ProdId(pk) ] [ PartNum ]

Tbl_Prod_Faqs (may-to-many)
[ ProdId (fk) ] [ FaqId(fk) ]

Tbl_Faq_Main
[ FaqId(pk) ] [ CatId (fk) ] [ Question ] [ Answer ]

Tbl_Faq_Categories
[ CatId(pk) ] [ Category ]

so that seems fine to me.

I want to display it hierarchically like this:

ProductA
FaqCategory1
Faqs[]
FaqCategory2
Faqs[]

ProductB
FaqCategory1
Faqs[]
FaqCategory2
Faqs[]
FaqCategory3
Faqs[]
FaqCategory4
Faqs[]


You get the idea.

So I have a series of nested controls and I need to pass them the
appropriate data source. Using 4 tables linked with DataRelations, I don't
see how I can easily get the FaqCategories for a given product.

what do you suggest? What is the cleanest, nicest way to handle my
situation here?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top