Manually Binding Windows Forms Controls
In many situations, you don’t want Visual Studio to create your data-bound controls for you, or you might need to bind existing controls to a data source. Data binding in these cases is just as simple and starts with the same step: creating or selecting a data source. Some controls, such as the DataGridView, have smart tag options for selecting a data source. Others don’t have intrinsic data dialog boxes associated with them but can be bound to data just as easily by working, again, with the Data Sources window.
Binding the DataGridView
Grab a DataGridView from the Toolbox and drag it onto the form’s surface. After you’ve created the control, select its smart tag glyph and use the drop-down at the top ...
Get Microsoft® Visual Studio® 2010 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.