I got sorted with this-
int childPosition =
this.BindingContext[dataSet11.Tables["Company"],"CompanyContact"].Position;
Thanks anyway.
Matthew
"Kathleen Dollard" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Mathew,
>
> Hard to guess without knowing how things are bound. Can you give us that
> information?
>
> Kathleen
>
>
> "Matthew Marsh" <(E-Mail Removed)> wrote in message
> news:#(E-Mail Removed)...
> > I have a simple master/detail application showing companies and related
> > contact names.
> > I have created a relationship between the two tables (named Company &
> > Contact) using the Dataset XML Schema designer.
> >
> > Using the CurrencyManager.Position property I can obtain the position of
> the
> > current record for both the Company and Contact tables as two separate
> > tables, but this does not give me the position of the Contact table as
> part
> > of the parent/child relationship.
> >
> > For example, using the following sample data
> >
> > Company List Box
> > --------------------
> > Western Farms
> >
> > Contact List Box
> > ------------------
> > Andrew
> > Peter
> >
> > Lets assume we only have 1 company and 2 contacts (both belonging to the
> > same company) -
> >
> > we select "Western Farms" from the Company list box
> > then we select "Peter" from Contact list box.
> >
> > At this point the currency manager provides this information-
> > Company - Position = 0
> > Contact - Position = 0
> >
> > The position for the Contact (Peter) should be 1.
> > The currency manager has not taken into account that the Contact table
is
> > part of a relationship.
> >
> > Can anyone please help with this.
> >
> > Many thanks
> > Matthew
> >
> >
>
>
|