O'Reilly logo

ASP.NET Developer's JumpStart by Ken Getz, Paul D. Sheriff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading the DataGrid Control with Data

In a previous chapter, you saw how to use the user-interface data components to bind a grid to a data source. You created OleDbDataAdapter and OleDbConnection objects and then used the menus to have the OleDbAdapter generate a typed DataSet for you. Although you can use these steps, you might want to bypass the overhead of the typed DataSet and bind the DataGrid to a simple DataSet that you create in code. As a matter of fact, you can bind a DataGrid to at least four different data objects:

  • DataSet

  • DataTable

  • DataView

  • DataReader

The only one of these that you haven't encountered yet is the DataView object. This object “wraps” itself around a DataTable and provides a sortable, filterable view of the data in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required