Link to home
Start Free TrialLog in
Avatar of ewang1205
ewang1205

asked on

what table structure can menu control work?

I have the following table.  Can that work in a menu control as base table?  Remember the column can expand to four, five, six?  Thanks.
 
COUNTRY      STATE           CITY         
USA      TEXAS           HOUSTON         
USA      TEXAS           DALLAS         
USA      CALIFORNIA   LA         

 
Avatar of rodmjay
rodmjay
Flag of United States of America image

Here is what I have come up with.  This would just be a basic datagrid.  The trick is getting it to display like this


Countries
 - USA
   - Texas
      - Houston
      - Dallas
   - California
      -LA

you can filter the results using XPath expressions, but I am not sure of all the details.
you may have to use an XmlDataSource
Avatar of ewang1205
ewang1205

ASKER

This is what I am debating.  I think option #2 is better.  What do you think?  Thanks.

Optoin #1:  a flat table with 3 columns  like the following.  I think the menu control doesn't work well with this type of table structure.  If I need to add 1 more column for county, then the menu control code will probably need to be modified.

COUNTRY     STATE          CITY        
USA     TEXAS          HOUSTON        
USA     TEXAS          DALLAS        
USA     CALIFORNIA   LA    

Option #2:  a self-join table like the following.  I think the menu control will work nicely with this table structure.  If there is one more layer for county, there is no coding change needed for the menu control .net part.  

Parent     Child
TEXAS    DALLAS
TEXAS    HOUSTON
USA       TEXAS
USA       CALIFORNIA
CALIFORNIA    LA
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial