Posted By

mafro on 09/19/08



Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Bind a Dictionary to a ComboBox

 / Published in: VB.NET

Really simple method of binding a Dictionary of key-value pairs to a ComboBox. A snippet I can never remember..

  1. 'dDates is a Dictionary(Of Int32, String)
  2. cmbDate.DataSource = New BindingSource(dDates, Nothing)
  3. cmbDate.DisplayMember = "Value"
  4. cmbDate.ValueMember = "Key"

Report this snippet  

You need to login to post a comment.