In this tutorial, you will learn how to attach a multicolumn True DBDropDown control to a grid cell. Unlike the built-in combo demonstrated in Tutorial 7: Displaying Translated Data with the Built-In Combo, the C1TrueDBDropDown control can be bound to a data source, which makes it ideal for data entry involving a secondary lookup table. The drop-down control appears whenever the user clicks a button within the current cell. This button appears automatically when the user gives focus to a column that has a drop-down control connected to it.
Complete the following steps:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.CustTypeTableAdapter.Fill(Me.DsCustType.CustType) |
To write code in C#
C# |
Copy Code
|
---|---|
this.CustTypeTableAdapter.Fill(this.DsCustType.CustType); |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1TrueDBGrid1.Columns("CustType").DropDown = Me.C1TrueDBDropdown1 |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1TrueDBGrid1.Columns["CustType"].DropDown = this.c1TrueDBDropdown1; |
You've successfully completed attaching a drop-down control to a grid cell; this concludes tutorial 8