General information
Title:
Binding Textbox to a Class Property
Help!!!
I am trying to bind a Class Property Address::Street
to a text box and the program keeps generating
an exception.
Any Ideas?
//DEFINE class Address
public class Address {
public String Street, City, State, Zip;
public int Amount;
}
public class WinForm : System.Windows.Forms.Form
{
///
/// Required designer variable.
///
//Create Class Address property
private System.Windows.Forms.TextBox tbStreet;
public string Street;
.
.
.
private void InitializeComponent()
{
//Initialize Address object
this.tbStreet = new System.Windows.Forms.TextBox();
this.oAddress = new Address();
this.tbStreet.DataBindings.Add("Text", oAddress,"Street");
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only