First off...Thanks for the help!!
Sample Data: There is only one table "categories". If I can get this part done, I think I can do the rest as all it is is hyperlinking each catergory to items.aspx page but I will post everything I can think of here. Include some additional comments that maybe you can comment on. I have created a test page that passes in an ID and the items.apsx page does as expected. This page & layout is the hurdle at the moment. I have also created a page that shows just the "top" level categories ( 1 - 4 ) in the table below. I have hyperlinked cName for each and when I click on the hyperlink it takes the associated ID and passes it to the items.apsx page as expected.
Db Table:
| ID |
cName |
parentCategoryID |
| 1 |
cName1 |
-99 |
| 2 |
cName2 |
-99 |
| 3 |
cName3 |
-99 |
| 4 |
cName4 |
-99 |
| 5 |
cName5 |
1 |
| 6 |
cName6 |
2 |
| 7 |
cName7 |
4 |
| 8 |
cName8 |
1 |
| 9 |
cName9 |
8 |
| 10 |
cName10 |
8 |
| 11 |
cName11 |
4 |
A parentCategoryID of -99 means this is a "top" level category. So looking at the table above IDs 1 - 4 are the top most categories. ID=5 is a sub-category of ID=1 (note its parentCategoryID = 1). ID=8 is a sub-category of ID=1 and you will notice that ID=9 is a sub-category of ID=8. I think you can figure out the rest of the hierarchial layout but the table below is what I want to display to the user.
| 1 |
cName1 |
|
|
| |
5 |
cName5 |
|
| |
8 |
cName8 |
|
| |
|
9 |
cName9 |
| |
|
10 |
cName10 |
| 2 |
cName2 |
|
|
| |
6 |
cName6 |
|
| 3 |
cName3 |
|
|
| 4 |
cName |
|
|
| |
7 |
cName7 |
|
| |
11 |
cName11 |
|
Each cName# would be hyperlinked to items.apsx and would pass the ID to determine what items to display.
In my research I found a posting about loading all the 'categories' on page load and then filtering that depending on the id that is passed in. The other examples I have found about nested GV talk about the rowdatabound.
I will say again, I am learning this as I go so I am open to anything. And though I have used DAL and BLL, I did so following examples so that I could learn. The problem I am running into now is that the nested GV examples don't show or use DAL & BLL, they access the DB directly in the page or code behind. So I haven't found an example that would show how to update the select parameter for my ODS. And I am not DB guru either so to hear that it might cause large DB connections raises a red flag. Last but not least...being a newbie to all this I can't "talk" to much just yet.
I hope this all makes sense and is usable in helping me find a solution.
Thanks!!