Svekke
Member
- Joined
- Jul 27, 2010
- Messages
- 14
- Programming Experience
- Beginner
Hi all,
I'm still working on my application to "calculate" prognostics. However, I've encountered a problem which I can't seem to solve with my "basic" VB. NET knowledge. Here is the case:
On the page "prognostics" I have a combobox. In this combobox I would like to display the current match on which you are betting, kinda like this:
"HOMETEAM - OUTTEAM". Each team has a unique ID (1, 2, 3, ... just a sequential number). The database setup looks like this:
TABLE MATCHES
MatchID
MatchDate
.....
Hometeam (foreign key number linked to TEAMID in teamtable)
OutTeam (foreign key number linked to TEAMID in teamtable, but to another team).
TABLE TEAMS
TeamID
TeamName
....
TABLE PROGNOSTICS
MatchID (foreign key number linked to MATCHID in matches)
....
Now is my question: how can I display both teamnames in one combobox, based on the MATCHID. So I'm having a datagridview on this page which currently displays only the MATCHID, but I would like the real teamnames to show up (displaymember), but to still keep the matchid as the valuemember.
Any ideas? This probably is very easy, but I have no idea :-(
I'm still working on my application to "calculate" prognostics. However, I've encountered a problem which I can't seem to solve with my "basic" VB. NET knowledge. Here is the case:
On the page "prognostics" I have a combobox. In this combobox I would like to display the current match on which you are betting, kinda like this:
"HOMETEAM - OUTTEAM". Each team has a unique ID (1, 2, 3, ... just a sequential number). The database setup looks like this:
TABLE MATCHES
MatchID
MatchDate
.....
Hometeam (foreign key number linked to TEAMID in teamtable)
OutTeam (foreign key number linked to TEAMID in teamtable, but to another team).
TABLE TEAMS
TeamID
TeamName
....
TABLE PROGNOSTICS
MatchID (foreign key number linked to MATCHID in matches)
....
Now is my question: how can I display both teamnames in one combobox, based on the MATCHID. So I'm having a datagridview on this page which currently displays only the MATCHID, but I would like the real teamnames to show up (displaymember), but to still keep the matchid as the valuemember.
Any ideas? This probably is very easy, but I have no idea :-(