WebCombo can be integrated with WebGrid as an EditType. This integration
can be specified using WebGrid Designer or programmatically in runtime.
In this topic, you will learn how to integrate WebCombo to WebGrid.
To integrate WebCombo to WebGrid
- Drag and drop WebGrid control to the WebForm.
- Set AllowEdit property to true in WebGrid
Designer.
- Drag and drop WebCombo control to the WebForm.
- Bind WebGrid
to AccessDataSource. (use Products table).
- WebCombo using ISDataSource
control. (use Suppliers table).
- Go to WebGrid's properties and choose a SupplierID column
from Columns collection.
- Set its EditType property to WebComboNET.
- Go to grid's SupplierID properties - ValueList
then set the following properties:
DataMember
|
Suppliers
|
DataSource
|
ISDataSource1
|
DataTextField
|
CompanyName
|
DataValueField
|
SupplierID
|
- Set the WebComboID to wcCategories.
- Run the project.