Complex Binding of Controls to Data

Simple binding is the process of tying a single control to a single data item. Complex binding ties a single control to many data items. Controls that are often used for complex data binding include DataGrid which has the appearance of a simple spreadsheet. This control can display, edit, or add and delete records from a table. A single databinding operation is used to attach the control to a DataTable. The DataGrid can only be used to show one table at a time, but it can be used to show relationships between tables.

Listing 3.3.3 shows a modified version of the simple binding example demonstrated in Listing 3.3.2. This listing removes all the controls associated with the DataSet and replaces them with a complex ...

Get C# and the .NET Framework: The C++ Perspective 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.