O'Reilly logo

C# Primer: A Practical Approach by Stanley B. Lippman

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

6.10. The DataGrid Control

The DataGrid control supports the display, entry, and selection of data in table format, with row and column access. This section shows a simple use of DataGrid to display database and XML data. In Figure 6.15, for example, a data grid is used to display the Access database food description table we worked with in Section 5.10.

Figure 6.15. The Default DataGrid View of an Access Database File

DataGrid is a drag-and-drop control of the Windows Forms designer. We simply drop the grid on the form, then position and size it. Our work involves getting the data into the grid. Typically, this is a two-step process:

1.
We retrieve ...

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