Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Displaying items from one listbox to another listbox in C#

$
0
0

Hello All,

Here i am having 3 Listbox as shown in the image below :- 

What I currently have is when i enter some name of the profile in textbox above displaying "Enter Profile Name" and when i click Create Profile button, the item will be added to 1st Listbox. lb_allprojects checked listbox display all projects  and we have to select project from this. And when i click a item in 1st listbox the items selected in the 2nd Checkedlistbox named lb_allprojects, will be added to the lb_selectedprojects. Now, when i click "save profile" button the profile will be saved in the format in a  Text File Like :- 

"1stListbox Item #Project1 #Project2 etc.". Project1 and 2 are the projects added from the 2nd checkedlistbox to 3rd checkedlistbox named as "lb_selectedprojects".  

What i need to do is when i click any item in the 1st list box the corresponding projects related to the selected item in the 1st Listbox will be displayed which is already saved in a file by clicking save profile button.

I want to know, how can i display the selected projects in the 3rd Checkedlistbox named as lb_selectedprojects, by selecting a item in the 1st Listbox.

Thanks.


Tanmay


Viewing all articles
Browse latest Browse all 2535

Trending Articles