I ran into a bit of a dilemma here. Need your advise please.
I have an Array() that's being passed from my Data Layer that I need to bind to the ComboBox.
I need to be able to populate the ComboBox with the array items and add one more item stating "Select User...".
The problem is that if I use cboUsers.DataSource = ...Visual Studio wont allow me to add extra items to the list by doing cboUsers.Items.Add().
If I use cboUsers.Items.AddRange() I can't access ValueMembers later on ( not sure why ). It returns Null.
Can anyone advise ?
The code for my Array and ComboBox is below
var userNames = (from u in usersCollection //IEnumerable collection
Id = u.Id,
Name = u.Name
cboUsers.DisplayMember = "Name";
cboUsers.ValueMember = "Id";