We help IT Professionals succeed at work.

Creating a Combo within a Grid

pire asked
It is possible in VB6 to insert or create a combo or list box within a Grid (Grid, DBGrid or FlexGrid)? How it is done? I will appreciate a lot if somebody has a link to or the explanation to this process. If not possible, what options do I have to get the result I'm looking (like the combos you find when creating an Access table), within a grid field), or to which object or control should I refer? I thank you all beforehand.
Watch Question

Senior .Net Consultant
Top Expert 2016
If finances are available, I would suggest looking into this grid control:  http://www.janusys.com/janus/

This is by far the best grid control that I have seen that easily allows you to create drop down combo boxes within the grid.  Lots of other functionality too.
Ryan ChongSoftware Tead Lead / Business Analyst / System Analyst / Data Engineer



i want to clarify that how GridEX updates the content from the frontend (VB) to the backend (SQL Server 2000) through ADO?

Is it using ADO Update method to perform record by record update? We wrote a lots of stored procedures and some data class (VB .cls) to handle database logic. We do not want to grant SELECT right on any of tables.

My question is:
Can GridEX support stored procedures?
Or i just use GridEX as a buffer to show/store the change users made. And then use GetRowData method to perform update logic through excuting suitable stored procedures
'Reference: Microsoft ActiveX Data Objects 2.5 Library

'Place this section at top of form
Private WithEvents rsADOSetRecord As ADODB.Recordset
Private adoDataGrid As ADODB.Connection

Private Sub sbLoadCombo()
Set adoDataGrid = New ADODB.Connection
Set rsADOSetRecord = New ADODB.Recordset
With rsADOSetRecord
.Open "SELECT DISTINCT " & strFiledName & " FROM " & strTableName, adoDataGrid, , , adAsyncFetch
If Not .BOF Then
Do While Not .EOF
If .Fields(0).Value <> vbNull Then combo1.AddItem .Fields(0).Value
End If
End With
End Sub

Explore More ContentExplore courses, solutions, and other research materials related to this topic.