Blog Home  Home Feed your aggregator (RSS 2.0)  
What did you learn today? - 70-552 Section II - Part IV - Data Binding
Phil Denoncourt's Technology Rants
 
 Friday, February 17, 2006

Implement data-bound controls.

  • Use the DataGridView control to display and update the tabular data contained in a data source.
  • Use a simple data-bound control to display a single data element on a Windows Form.
  • Implement complex data binding to integrate data from multiple sources.
  • Navigate forward and backward through records in a DataSet in Windows Forms.
  • Define a data source by using a DataConnector component.
  • Create data forms by using the Data Form Wizard.

There's a big section at WindowsForms.net on the DataGridView.  The DataGridView is the successor to the DataGrid.  They added more cell types: Image, Combobox, Link, Button.  (They only had Textbox and Checkbox in 1.1).  You can place more than one control in a cell.  There are now events associated with the cell itself, instead of handling all the events on the datagrid control.  The CellFormatting event allows you to control the look of specific cells.

The data binding subsystem has undergone a major overhaul.  As in 1.1, there is a different binding system for WinForms than WebForms.  Again there is a section at WindowsForms.Net dedicated to data binding, although not very comprehensive.  Dinesh Chandnani has a series of good blog entries on databinding.  The main component is called the BindingSource.  You can make your own components bindable by using the BindingList generic.

I'm not sure what they mean by complex data binding.  Handling some of the events in the BindingSource?

The BindingNavigator control is a Toolstrip control that hooks to a BindingSource that has the first,prev,next,last buttons already implemented.  You would use that to navigate through records in a dataset on a windows form.

The DataConnector component no longer exists.  It was renamed to BindingSource in earlier Whidbey releases.

Alright, I give up.  My wife tells me that I stink at looking for things.  My keys could be right in front of me and I won't see them.  With that disclaimer in mind, I've been looking 15 minutes for the "Data Form Wizard".  It clearly existed in 1.1.  Where is it?  If anyone knows where it is, let me know.

Next up->Connections and Transactions

Friday, February 17, 2006 3:37:24 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
Comments are closed.
Copyright © 2010 Phil Denoncourt III. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: