Skip to Content
Windows Forms Programming in Visual Basic .NET
book

Windows Forms Programming in Visual Basic .NET

by Chris Sells, Justin Gehtland
October 2003
Intermediate to advanced
736 pages
15h 25m
English
Addison-Wesley Professional
Content preview from Windows Forms Programming in Visual Basic .NET

Custom Data Sources

Although the data set is a popular data source, it's by no means the only one. Any custom type can be a data source.

Custom Item Data Sources

The requirements of an item data source are only that it expose one or more public properties:

 ' Expose two properties for binding Class NameAndNumber Public Property Name() As String Get Return myName End Get Set myName = Value End Set End Property Public Property Number() As Integer Get Return myNumber End Get Set myNumber = Value End Set End Property Dim myName As String = "Chris" Dim myNumber As Integer = 452 End Class Dim source As NameAndNumber = New NameAndNumber() Sub CustomItemDataSourceForm_Load(sender As Object, e As EventArgs) ' Bind to public properties textBox1.DataBindings.Add("Text", ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Visual Basic .NET

Learning Visual Basic .NET

Jesse Liberty
Windows Forms 2.0 Programming

Windows Forms 2.0 Programming

Chris Sells, Michael Weinhardt

Publisher Resources

ISBN: 0321125193Purchase book