Avatar of CipherIS
CipherIS
Flag for United States of America

asked on 

VB.NET ComboBox Datasource

Trying to populate my combobox.  I get an error on "ValueMember".  When I bypass that statement the combobox is filled with "System.Data.DataRow".
    Private _results As New List(Of DataRow)

    Dim SQL As String = String.Empty
    Dim sqlData As New SQLData

    Private Sub PopulateSuppliers()

        Me.cbSupplier.Items.Clear()
        Me.cbSupplier.DataSource = Nothing

        SetSupplierSQL()
        _results = sqlData.SelectStatement(SQL)

        Me.cbSupplier.DataSource = _results
        Me.cbSupplier.DisplayMember = "id"
        Me.cbSupplier.ValueMember = "name"

    End Sub

Open in new window


Any ideas?
Visual Basic.NET.NET ProgrammingC#

Avatar of undefined
Last Comment
CipherIS

8/22/2022 - Mon