By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,741 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,741 IT Pros & Developers. It's quick & easy.

listbox click binding

P: n/a
I have populated listbox with data from the datatable.

I binded SelectedValue to the another datatable - i.e. selection result
(with VS 20005 wizard).

Selection result datatable has one column with type Int32.

ListBox.SelectedValue type is also Int32. ListBox selection mode is
Multiselect.

Is it possible to have selected values as datarows in the selection result
table ? I.e. user selects one item in listbox and listbox (i.e. its
bindingsource) inserts one row in the result table. Than user selects
another row, and listbox inserts another row in the selection result table.

This means that result table contains 2 rows with "ListBox.SelectedValue1"
and "ListBox.SelectedValue2".

I know that I can do:

foreach (object item in listBox1.SelectedItems)

{

....

}

Thanks in advance.

Sanjin
Jun 6 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.