Jon-G
asked on
move values from 1 listview to another in C# 2008 WPF
I have a WPF C# application (NOTweb based)
I am trying to create an interface where the user gets a list of freelancers in a listview (listViewFreelancers).
They can choose freelancers and press a button (buttonSelect) which moves them into a 2nd listview (listViewSelected) to show them what they have selected.
Once they have finished selecting they will press a 2nd button (buttonSend) which will an e-mail to all of the freelancers which were selected.
_______________
I have used LINQ to SQL to bind a listview called listViewFreelancers to a LINQ query.
(there are multiple columns, the 1st column being the row_id)
I now need to take the selected rows from listViewFreelancers and move them into listViewSelected. I then need to read them out of listViewSelected so that I can e-mail them.
1) I can't figure out the code to move the selected items from 1 listview to another
2) I don't know how to read the items out of the listViewSelected once they are ready to e-mail the freelancers.
Can someone help ?
Thanks
Jon
I am trying to create an interface where the user gets a list of freelancers in a listview (listViewFreelancers).
They can choose freelancers and press a button (buttonSelect) which moves them into a 2nd listview (listViewSelected) to show them what they have selected.
Once they have finished selecting they will press a 2nd button (buttonSend) which will an e-mail to all of the freelancers which were selected.
_______________
I have used LINQ to SQL to bind a listview called listViewFreelancers to a LINQ query.
(there are multiple columns, the 1st column being the row_id)
I now need to take the selected rows from listViewFreelancers and move them into listViewSelected. I then need to read them out of listViewSelected so that I can e-mail them.
1) I can't figure out the code to move the selected items from 1 listview to another
2) I don't know how to read the items out of the listViewSelected once they are ready to e-mail the freelancers.
Can someone help ?
Thanks
Jon
bookITDataContext db = new bookITDataContext();
var queryFreelancers = from p in db.Freelancer_basics
select p;
// binding my listview to the results of the query
this.listViewFreelancers.ItemsSource = queryFreelancers;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window