M
mzam
Hello everyone,
I have the following ListBox that I populate from a DataView and do the
Databinding as follows:
myDataView = new DataView(myDataSet.myDataTable);
myListbox.DataSource = myDataView;
myListbox.ValueMember = "ID";
myListbox.DisplayMember= "Name";
myListbox.DataBindings.Add("SelectedValue",
myDataSet.myOtherDataTable,"SomeID");
The ListBox is set to multiselect.
The questions is how do I get the values the user has selected in the
ListBox. I do not want to get the DisplayMember but the ValueMembers since I
will be using this ids later in the code.
Cheers!
MZam
I have the following ListBox that I populate from a DataView and do the
Databinding as follows:
myDataView = new DataView(myDataSet.myDataTable);
myListbox.DataSource = myDataView;
myListbox.ValueMember = "ID";
myListbox.DisplayMember= "Name";
myListbox.DataBindings.Add("SelectedValue",
myDataSet.myOtherDataTable,"SomeID");
The ListBox is set to multiselect.
The questions is how do I get the values the user has selected in the
ListBox. I do not want to get the DisplayMember but the ValueMembers since I
will be using this ids later in the code.
Cheers!
MZam