PC Review


Reply
Thread Tools Rate Thread

CurrencyManager Position in child table

 
 
Matthew Marsh
Guest
Posts: n/a
 
      15th Jul 2003
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


 
Reply With Quote
 
 
 
 
Kathleen Dollard
Guest
Posts: n/a
 
      16th Jul 2003
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
>
>



 
Reply With Quote
 
Matthew Marsh
Guest
Posts: n/a
 
      17th Jul 2003
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
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with currencymanager position =?Utf-8?B?cm9zc3U=?= Microsoft ADO .NET 2 4th Dec 2005 10:37 PM
CurrencyManager Position issue Pete Davis Microsoft Dot NET Framework Forms 2 7th Apr 2005 10:44 PM
How to get the position of a child table row =?Utf-8?B?RGF2aWQgSg==?= Microsoft Dot NET Framework Forms 0 18th May 2004 09:21 PM
CurrencyManager.Position ?? Chris Microsoft C# .NET 1 31st Mar 2004 02:56 PM
Combo currencymanager position not set Shravan Microsoft C# .NET 0 7th Nov 2003 10:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 AM.