This demo illustrates Essential Grid’s support for the foreign-key combo boxes in grid cells.
In this sample,
The top-left grid has three columns, which are populated with three ID columns from the Orders table in the Northwind database.
The first column shows the raw ID of the order, but instead of the next two columns showing the customer ID and the employee ID.
These columns use individual combo boxes to display the company's name and the employee's name based on the IDs.
The combo boxes are bound to the Customer table and the Employee table in order to make a correspondence between the IDs and the displayed values.
This sample shows these secondary tables(Customer table and Employee table) as well as a grid that shows the raw values from the Orders table.
Features:
With the exception of a few lines of code, the Form_Load handler is used to set column widths and fill the data set.
The entire sample is built using the designer, including the creation of data adapters for required tables and adding data bound grid columns to the primary grid that shows the foreign-key data.
The cell type of the grid is set to combo box to get the combo box columns; data source, display member, and value member are also set.