List Box

G

Greg

I am using the following procedure to fill my lstLanguageID list box. It
works just great. But I have noticed I cannot use the InsertAt(x),
RemoveAt(x), RemoveRange(X), etc. methods. Are these all not available when
you populate the list box via a DataSource instead .

Private Sub sFillLanguageID()

Using objLanguage As New Business_Logic.Language

Try

m_dtLanguages = objLanguage.GetLanguages(False)

Me.lstLanguageID.DataSource = m_dtLanguages

Me.lstLanguageID.DisplayMember = "Language"

Me.lstLanguageID.ValueMember = "LanguageID"

Catch ex As Exception

MessageBox.Show("Error: " & ex.Message)

End Try

End Using

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top