Bind Control to an Object in Windows Forms
Simple solution for basic binding in Windows Forms app. This would NOT be recommended if you are using ASP .Net, Silverlight, WCF, RIA or any other services to retrieve the data as these project types have much better support for binding to controls.
C#:
static class dataaccess { static mytype object; } //on app load object = new mytype(); //on form load tbField1.DataBindings.Add("Text", dataaccess.object.property, "Field1")
Posted on January 17, 2011, in Programming & Development and tagged .net, .net 2.0, .net 3.5, bind, binding, bindings, bound, class, control, csharp, data access, data layer, databind, databinding windows forms, databindings, databound, form, forms, object, windows. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0