Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / July 2004

Tip: Looking for answers? Try searching our database.

Using BindingContext with a Typed Dataset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
liam - 13 Jul 2004 10:56 GMT
Hello,

I am trying to increment the position of the currency
manager for a given typed dataset.

This line works -

Me.BindingContext
(DataSetInstallers, "Installers").Position += 1

This line does not work

Me.BindingContext(DataSetInstallers.Installers).Position
+= 1

Any ideas why this is the case.  I thought that one of the
benefits of typed Datasets was that there would be no need
to specify tables names etc in quotes.

liam
Miha Markic [MVP C#] - 13 Jul 2004 14:02 GMT
Hi,

You are getting two different BindingManagers because of the way you pass
parameters.

Signature

Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

> Hello,
>
[quoted text clipped - 16 lines]
>
> liam
liam - 14 Jul 2004 16:15 GMT
Miha,

Thanks for your reply but I don't really understand what
you mean.  I think I may not have explained myself well.

I am not attempting to use both the lines of code at the
same time.  I try using one and then comment it out and
then use the other.  The purpose of this is to update the
text of a TextBox which is bound to the Installers table
of the DataSetInstallers DataSet.

So, is your answer still the same?  If it is then do you
know what the difference is between
(DataSetInstallers, "Installers") and
(DataSetInstallers.Installers) is?

many thanks,

liam

>-----Original Message-----
>Hi,
[quoted text clipped - 24 lines]
>
>.
Miha Markic [MVP C#] - 15 Jul 2004 12:03 GMT
> Miha,
>
> Thanks for your reply but I don't really understand what
> you mean.  I think I may not have explained myself well.

You did :-)

> I am not attempting to use both the lines of code at the
> same time.  I try using one and then comment it out and
[quoted text clipped - 6 lines]
> (DataSetInstallers, "Installers") and
> (DataSetInstallers.Installers) is?

The difference is the way you pass parameters. In first line you pass
dataset and string while in second line you pass DataTable. This matters.
Yes, they both refer to the same table but they don't refer to the same
BindingManagerBase (this often confuses people).
You should pass parameters in the same way you do the binding.

Signature

Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

liam - 15 Jul 2004 16:19 GMT
Ah, that make more sense now.  Thanks for your help.

>-----Original Message-----
>
[quoted text clipped - 21 lines]
>BindingManagerBase (this often confuses people).
>You should pass parameters in the same way you do the binding.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.