|
|
Displaying a Combo Box in Cell Frequently, besides displaying text in a cell you may want to display a drop-down list box to allow users to select from a list of pre-determined values. In this case, you need to add a Combo Box to the cells in the desired column. Text) End Try End Sub Private Sub fill_cbos() Dim cmd As Ole Db Command Dim ds As New Data Set Dim da As Ole Db Data Adapter cmd = New Ole Db Command("select * from Table2", con) If con. Value Member = "tbl2_ID" End With cmd = New Ole Db Command("select * from Table3", con) If con.
|
|

Data Grid View Cell Validating Event Args) Handles Data Grid View1. Add("Type C") '---create a combobox column--- Dim combo Box Col As New Data Grid View Combo Box Column '---set the header--- combo Box Col. Header Text = "Types" '---add items to it--- combo Box Col. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". Value Member = "tbl3_ID" End With End Sub End Class C programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Add("Price", "Price") '---add a combobox column--- Dim combo Box Col As New Data Grid View Combo Box Column '---set the header text--- combo Box Col.
|