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 / November 2004

Tip: Looking for answers? Try searching our database.

Designer/properties databinding, how???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Julie - 11 Nov 2004 21:10 GMT
I'm trying to use data bindings through the control designer properties, and
getting
nowhere at light-speed.  The online help for data bindings is virtually useless
as a tutorial on the subject, and I haven't been able to locate anything
through Google.

I've set up data bindings manually, and they work just fine, but I'm just
trying to figure out how to do it through the property page for the control.
Manually (simplified), this is what I have (C# windows form app):

public class Parameters
{
 private string userName;
 public string UserName
 {
   get { return userName; }
   set { userName = value; }
 }
 // etc.
}

public class MyForm : Form
{
 private Parameters parms = new Parameters();
 private TextBox txtUserName;

 public MyForm()
 {
   InitializeComponent();
   txtUserName.DataBindings.Add(new Binding("Text", parms, "UserName"));
 }
 // etc.
}

and everything works just dandy.

*However*, what I want to be able to do is to create the databinding
automatically through the property page DataBindings.  For the txtUserName
control, the DataBindings Text drop down has (none), and if I type something
like parms.UserName, I get an "Invalid property value" error.  I've tried
"parms.UserName", parms, "UserName", etc., and nothing works.

So, finally my question:  where is some decent documentation & tutorial on how
to use the DataBindings from the property page?  Anyone have any comments on
correct usage?
John Saunders - 12 Nov 2004 16:03 GMT
> I'm trying to use data bindings through the control designer properties,
> and
[quoted text clipped - 3 lines]
> as a tutorial on the subject, and I haven't been able to locate anything
> through Google.

The following is more information than you're looking for, but you might
want to bookmark it for later:
INFO: Roadmap for Windows Forms Data Binding
(http://support.microsoft.com/kb/313482#4b).

John Saunders

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.