473,287 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

How to get selected items from a CheckedListBox in C#?

navanova
Hello, I have a multiple selection in a checked list box in my form. however, I just want to get those selections. How would I do that?

Thanks,
Nov 22 '07 #1
1 5167
dip_developer
648 Expert 512MB
Hello, I have a multiple selection in a checked list box in my form. however, I just want to get those selections. How would I do that?

Thanks,
Expand|Select|Wrap|Line Numbers
  1.  
  2.     DataRowView checkedItem; 
  3.     foreach ( checkedItem in myCheckedList.CheckedItems) { 
  4.         Interaction.MsgBox(checkedItem.Row("ListItem1")); 
  5.     } 
  6.  
  7.  
Nov 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bobby | last post by:
I want to enable/disable individual items in a checkedlistbox. I have a field in a db that tells me whether the item should be enabled. I am just not sure how to disable an item in the...
1
by: mphanke | last post by:
Hi, what is the way to go for adding colored items to the checkedlistbox control?? I can't find any solution eventhough I'm browsing the web for hours now... I actually planned to overwrite...
2
by: Corey Scheich | last post by:
Coming from mostly VBA to VB.NET so bare with me. I am creating a form with a CheckedListBox. I want to populate the listbox as the user types in a value. I tried to use ...
0
by: Marcin Podle¶ny | last post by:
Hi, I need some help with my CheckedListBox. I'd like to set some of CheckedListBox items to read only. I would also like to set these items to look different than other items (i.e. they could be...
1
by: engloon | last post by:
In VB.NET, i want to create a checkedlistbox that contains some items. some of the items is checked based on some condition. if the item is checked, i don't want user to unchecked it, so i need to...
1
by: engloon | last post by:
hi guys, below is the code i wrote. but it only return the first checked item even i have 2 items checked. please help on this problem. any help would be appreciated, thanks. Dim indexchecked...
0
by: diego | last post by:
Greetings from the Philippines! I have a checkedlistbox contained in a tabpage of a tab control. i can programmatically check the items. i can see the items get checked when the tab page has...
1
by: ramkumar533 | last post by:
Hi all.. I am designig a form. its having a checkedlistbox control in vb.net2005 v1.2 . During the execution only one item should be checked at a moment. if one value is already selected,...
1
by: TheDevelopers | last post by:
Hi All, I am using VB.NET 2005. I am using the control CheckedListBox control on my form, which is a collection of multiple check boxes. i am selecting multiple items from the collection and...
1
by: nczimm | last post by:
CheckedListBox1.SelectedValue does not seem to have a mechanism for identifying the selected items. It just takes the first item. There doesn't seem to be a way to relate checked items to selected...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.