|
Question : How to copy Selected items from one list box t oanother list box after the button insert is clicked
|
|
How to copy Selected items from one list box t o another list box after the button insert is clicked
|
|
Answer : How to copy Selected items from one list box t oanother list box after the button insert is clicked
|
|
Hi kranthi4uonly;
The original question was, "How to copy Selected items from one list box to another list box after the button insert is clicked"
Now to do what you want you need to do the following. 1. When removing items from listBox1 you need to go to the data table and remove the record that was selected in the listBox1, the record can be identified within the for loop statement, value[row] = ((DataRowView)dataRow).Row.ItemArray[2];, and of course the rest of that code will add it to listBox2.
2. When removing items from listBox2 to place into listBox1. Items can be removed from listBox1 in the normal way. To add it to listBox1 you need to go to the data table and get a new row from the data table and populate the row. Once the row is populated then you can do an update to the database.
Fernando
|
|
|