I have a C# winforms database application.
I want to create a custom user control which will go on say an add new customer page. I have my database app all wired up. I have DataTables, and TableAdapters, and other stuff... but I don't see a way to create a custom UI which will bind the windows form controls to an object which I could then use to add to the database. I expected there to be some way that i could drag some table from my dataset onto my form which would add things like textbox's for each column. I know something like this must exists but I just don't know what to call it... things like DataBinding giving me a bunch of examples which show how you could update put like a phone number in a text box when the Custome row in a DataTable is selected.
I want to avoid doing:
public void button1_OnClick() {
MyDatabase.OrganizationRow r = new MyDatabase.OrganizationRow();
r.ID = textbox1.Text;
r.Name = textbox2.Text;
r.ShortName = textbox3.Text;
this.myDatabase.Organization.Rows.Add(o1);
this.myDatabase.AcceptChanges();
}
Thanks in advance. I'm using .NET 2.0 and VS 2005.