Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey!
So i have a task where I am create an application for the user to select the name of a tree, and select 2 different years ( like 1920 and 1980) and then the app will show how many trees there were of that type in those 2 years. Im quite the beginner in programming, but really eager to learn! The difficulty on this shoudln't be too high, so I tried a little with dropdownlists, but couldn't quite figure out how to link them :/

This is the info i was given..

Trees   1915 1950 1970 1990 1992 2000
Furu     20   31   53   89   102 117
Gran     23   39   72   89   92  99
Lauvtre  4    6    8    12   15  18


Is ddl even the right solution for this?

Thanks for any help! =)
Posted
v3
Comments
V. 21-May-13 8:37am    
You're not clear. Why would you want to select 2 years and not 5 or 10 ? Or do you want to select the number of trees between year 1 and year 2 ? What dropdown list should be 'linked', what do you mean by that? Best example of linked lists are country, city, street options eg. it is indeed not that difficult.
Twinniez 21-May-13 8:40am    
What i want is for the user to be able to select 2 of the years listed above and 1 of the tree types, and then the app will print how many trees there were of that exact tree in both of those years
lukeer 21-May-13 9:23am    
That still doesn't link the lists. It's just 3 lists containing trees, firstYears and secondYears.

Except there should be some extra logic that perhaps prevents using the same year twice, second must be later than first, and so on. Is there some such condition?
Zafar Sultan 21-May-13 9:29am    
So what is the problem? What have you tried so far?
Twinniez 21-May-13 9:34am    
My problem now is that when i select the tree "furu" and the year "1950" how do i make it extraxct the info for how many there were of that exact tree that exact year?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900