473,413 Members | 1,993 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,413 software developers and data experts.

Checked List Box Help

Rob
I am doing something wrong...

I am populating a Checked List box from a stored proc...

CheckedListBox1.DataSource=dsStates.Tables("States ")
CheckedListBox1.DisplayMember = "State"
CheckedListBox1.DisplayMember = "State"
"State" is the column in the table...

And the above works fine... All the states are shown in the CheckedListBox
I then want to loop thru to find the ones that were checked (process is
invoked from a button)...

Dim i as integer

For i=0 to CheckedListBox1.Items.Count -1
If CheckedListBox1.GetItemChecked(i)= true then
Msgbox ("Checked: " & CheckedListBox1.GetItemText(i))
End if
Next

The above code will give me the integer associated with the row number, but
how do I return the value of the rows contents (i.e., FL) ?







Jul 12 '06 #1
3 1139
For Each Item As Object In CheckedListBox1.CheckedItems
MsgBox(CheckedListBox1.GetItemText(Item))
Next

Jul 12 '06 #2
For Each Item As Object In CheckedListBox1.CheckedItems
MsgBox(CheckedListBox1.GetItemText(Item))
Next

Jul 12 '06 #3
Rob
Thank you very much !
"c_shah" <sh*********@netzero.netwrote in message
news:11**********************@35g2000cwc.googlegro ups.com...
For Each Item As Object In CheckedListBox1.CheckedItems
MsgBox(CheckedListBox1.GetItemText(Item))
Next

Jul 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
by: Simon Jefferies | last post by:
Hello, I am trying to add an item to a checked list box, like: clbList.Items.add("Hello",true) I get an error back: Run-time exception thrown: System.ArgumentOutOfRangeException -...
0
by: adam | last post by:
A simple solution would be to have them double click a name in the list and just add the selected item to a seperate textbox, doing anything DB related in the double click event. >-----Original...
2
by: rishabhshrivastava | last post by:
Hi All, I am using CallBack feature in ASP.NET 2.0 and I am running into a problem with checkboxlist control. I have to find out which checkboxes are checked and get their values at...
2
by: Aaron Reimann | last post by:
I have a lot of check boxes. This is an update of the check boxes, I want something was checked, then to do an insert (which is currently working), if something is no longer checked...delete the...
1
by: sherifffruitfly | last post by:
Hi, I've got a checked list box, and a "go' button on the form. Each item in the checked list box is associated with a program (say notepad, calc, etc.). When the user clicks "go", every item...
4
by: Annie | last post by:
hello guys, I am having a DataGridView control. The first column is a checkbox column. The users can select the checkbox column. I need to loop through the grid rows and get the checked...
2
by: saurabhnsit2002 | last post by:
Can anyone help me about how to create combo box with its items as checked boxes or radio buttons. This has to be done in C#. I have seen something similar to this named custom combo boxes but they...
0
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.