Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
GeneralRe: DLL Not Found Problem! Pin
LongRange.Shooter23-Mar-06 4:10
LongRange.Shooter23-Mar-06 4:10 
QuestionLanguage Problem Pin
snouto22-Mar-06 10:21
snouto22-Mar-06 10:21 
AnswerRe: Language Problem Pin
leppie22-Mar-06 19:57
leppie22-Mar-06 19:57 
Questionclient application Pin
haseeb_saeed22-Mar-06 9:35
haseeb_saeed22-Mar-06 9:35 
AnswerRe: client application Pin
Ed.Poore22-Mar-06 10:25
Ed.Poore22-Mar-06 10:25 
AnswerRe: client application Pin
snouto22-Mar-06 10:29
snouto22-Mar-06 10:29 
QuestionTransprency image on Pocket PC Pin
bouli22-Mar-06 9:34
bouli22-Mar-06 9:34 
QuestionUsing DataRelation for DataBindings backwards? Pin
bobbyn31422-Mar-06 9:31
bobbyn31422-Mar-06 9:31 
Hi,

I hope this is the right board for this (my first post here at codeproject).

I have a DataSet containing three Tables: address, country and project. There are two DataRelations defined. One address points to a country and some projects point to one address. I trying my luck with a lot of data binding, so I use some label controls to show the entries of one address.

For example:
myLabelAddressName.DataBindings.Add("Text", myDataSet.DefaultViewManager, "address.name");

To show all related projects in a listbox I use:
myListboxProjects.DataSource = myDataSet.DefaultViewManager;<br />
myListboxProjects.DisplayMember = "address.RelationAddressToProjects.projectnumber";


To control the actual data row to be displayed, I use a CurrencyManager:
CurrencyManager curr = (CurrencyManager) this.BindingContext[myDataSet.DefaultDisplayManager, "address"];<br />
curr.Position++;


This works quite fine so far, but now comes the problem. What do I do, if I want the correct country for every address being display (data bound) to another label? Remember, in this case the country table is the master and the address is the child.

I would think of something like this:
myLabelAddressCountry.DataBindings.Add("Text", myDataSet.DefaultViewManager, "address.RelationAddressToCountries.countryname");

The problem simply is, that I cannot create the relation RelationAddressToCountries, since there is not an address to every country, which would be mandatory. Can I somehow use the relation from countries to addresses backward?

Greetings,
Bob
QuestionDesigner Question Pin
Marc Clifton22-Mar-06 9:28
mvaMarc Clifton22-Mar-06 9:28 
QuestionHow Do We Create a Checker Game? Pin
jeff1922-Mar-06 9:14
jeff1922-Mar-06 9:14 
AnswerRe: How Do We Create a Checker Game? Pin
DigitalKing22-Mar-06 18:40
DigitalKing22-Mar-06 18:40 
GeneralRe: How Do We Create a Checker Game? Pin
Member 156244864-May-22 5:17
Member 156244864-May-22 5:17 
QuestionHiding a Tab Control Pin
Franz Klein22-Mar-06 9:11
Franz Klein22-Mar-06 9:11 
AnswerRe: Hiding a Tab Control Pin
jonas_berg22-Mar-06 10:05
jonas_berg22-Mar-06 10:05 
AnswerRe: Hiding a Tab Control Pin
Ed.Poore22-Mar-06 10:06
Ed.Poore22-Mar-06 10:06 
QuestionProgressive vs. Baseline JPEG Pin
SylvesterW22-Mar-06 9:10
SylvesterW22-Mar-06 9:10 
AnswerRe: Progressive vs. Baseline JPEG Pin
DaBears22-Mar-06 11:39
DaBears22-Mar-06 11:39 
GeneralRe: Progressive vs. Baseline JPEG Pin
SylvesterW22-Mar-06 19:45
SylvesterW22-Mar-06 19:45 
GeneralRe: Progressive vs. Baseline JPEG Pin
DaBears23-Mar-06 5:36
DaBears23-Mar-06 5:36 
GeneralRe: Progressive vs. Baseline JPEG Pin
SylvesterW23-Mar-06 11:17
SylvesterW23-Mar-06 11:17 
GeneralRe: Progressive vs. Baseline JPEG Pin
DaBears23-Mar-06 11:30
DaBears23-Mar-06 11:30 
GeneralRe: Progressive vs. Baseline JPEG Pin
SylvesterW23-Mar-06 19:13
SylvesterW23-Mar-06 19:13 
QuestionC# Generating Outlook contacts Pin
Paul Sullivan22-Mar-06 8:57
Paul Sullivan22-Mar-06 8:57 
Questionbinding a datagrid to an arraylist Pin
brianmelion22-Mar-06 8:21
brianmelion22-Mar-06 8:21 
QuestionHow to get User Idle time Pin
engsrini22-Mar-06 7:17
engsrini22-Mar-06 7:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.