Using a DBGrid Control

A DBGrid control displays data in spreadsheet format, organizing data in columns, rows and cells. Pick Data Provider's DBGrid control contains the standard grid features and, additionally, is built to natively understand multivalue data . It can display multivalue data in a column where each row represents a value of an attribute, or it can display a controlling/dependent multivalue structure, as found in many Pick and Pick-like databases.

Columns of a DBGrid can be bound to multiple data files to combine data from multiple sources into a single view. Columns can also be unbound where data is generated through code, such as in a total column of an order entry screen.

DBGrid columns can display single units of data using a standard editor, or can be customized to display combo boxes, check boxes, radio buttons, or any Visual Studio .NET control.

The DBGrid control allows users to enter data and save it to a file. Because it understands the nature of multivalue data, it is not necessary to write special code to handle controlling/dependent updates.

In this tutorial, we create an orders form that uses a DBGrid control to enter line items. We illustrate how to bind DBGrid columns to multiple data sources, how to create calculated columns, and how to react on cell changes.

This section contains these topics: