Hello All,
In two different books, Simple Data Binding to a control is explained
with an example of a TextBox where the data is initialized with an
array.
For example a class is defined as such:
public class Vendor
{
private string vendorName;
public string VendorName
{
get
{
return vendorName;
}
set
{
vendorName = value;
}
}
public Vendor(string strVendorName)
{
VendorName = strVendorName;
}
}
}
A TextBox is placed on the main form Form1 with the following code:
public Vendor[] aVendors;
private void Form1_Load(obje ct sender, System.EventArg s e)
{
this.aVendors = new Vendor[3];
aVendors[0] = new Vendor("Microso ft");
aVendors[1] = new Vendor("Praxis" );
aVendors[2] = new Vendor("Rationa l");
txtVendor.DataB indings.Add("Te xt",aVendors,"V endorName");
}
where txtVendor is the name of the TextBox.
My question now is what else can you do with this? What's the point?
Is there some utilitarian advantage here that I am not seeing?
Neither of the texts expands on this. They both go into Complex Data
Binding which is a different animal. FYI,I am coming from the MFC VC++
world is that means anything.
Thanks,
Joe
I can also be reached at:
filter1_at_digi talchickenDOTne tNOSPAM
Comment