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

FindString CheckListBox

Hello
I have a little problem i have a checkedlistbox with
several repeated items.

The code below only selects the first ocurrence

While reader.Read
For i = 0 To Me.CheckedListBox1.Items.Count - 1
Me.CheckedListBox1.SetItemChecked
(Me.CheckedListBox1.FindString(reader.GetString(0) ), True)
Next
End While
reader.Close()

Any suggestion to select all of them?
Thanks

Jorge Cavalheiro

Nov 20 '05 #1
2 2051
Cor
Hi Jorge,

I never used the checked listbox, and I know you know enough about this to
find it yourself if you see what you did probably wrong.
The code below only selects the first ocurrence

While reader.Read
For i = 0 To Me.CheckedListBox1.Items.Count - 1
Me.CheckedListBox1.SetItemChecked
Which one you think will be checked except the first, there is not an
indexer?

I think it has to be something as

me.checkedlistbox1.items(i).setitemchecked (I do not know if that is the
right one but that you can see in your intelisense I think.

:-)
(Me.CheckedListBox1.FindString(reader.GetString(0) ), True)
Next
End While
reader.Close()

Cor
Nov 20 '05 #2
Hi Cor
Good point got to work, thanks
Jorge
-----Original Message-----
Hi Jorge,

I never used the checked listbox, and I know you know enough about this tofind it yourself if you see what you did probably wrong.
The code below only selects the first ocurrence

While reader.Read
For i = 0 To Me.CheckedListBox1.Items.Count - 1
Me.CheckedListBox1.SetItemChecked
Which one you think will be checked except the first,

there is not anindexer?

I think it has to be something as

me.checkedlistbox1.items(i).setitemchecked (I do not know if that is theright one but that you can see in your intelisense I think.
:-)
(Me.CheckedListBox1.FindString(reader.GetString(0) ), True) Next
End While
reader.Close()

Cor
.

Nov 20 '05 #3

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

Similar topics

0
by: Rene Aguirre | last post by:
Hello everybody, I had this problem using the FindString funcion of a wxChoice object on wxPython: * I have Windows 98 * I read a text file edited on a Japanese computer, but only uses...
5
by: Bernie Yaeger | last post by:
Is there any way to get a listbox or a checklistbox behave in an autocomplete manner, such that given 'two', 'three', 'water', 'them' would bring the selection to 'two' (not 'water') when I key in...
17
by: amber | last post by:
Hello. Can someone tell me what I may be doing wrong here? I'm using the code (lboxRP is a listbox): Dim newRPindex As Integer newRPindex = Me.lboxRP.FindString(RP)...
3
by: MikeY | last post by:
Hopefully someone can help me on this. I am using C#, making Windows forms. I have created a listView with checkbox's. I have enabled the checkboxes under the properties, and all the data,...
1
by: comic_rage | last post by:
Hi, I created a checkListBox to allow the user to select and place a check next to multiple items in the GUI. I would like to add a 2 column where the first column show the description of the...
2
by: Mike Kim | last post by:
hi all, i have a checklistbox populated with about 50 items from database. and on the same form, i added to button to do the following. if you click this button, i want to have all items in the...
0
by: Ville Mattila | last post by:
Dear readers, I've some problems with the data binding of the checklistbox control. I'm using it with user preferences that are stored in a XML File. Information from the file is fetched with...
1
by: obrienkev | last post by:
Hi, I want to mark the CheckListBox items as Checked based on a database query. So the CheckListBox items should be checked if each item matches fundsAffected field from the below query... ...
3
by: khalidjan9 | last post by:
I have data in an arraylist and i want to add data to checklist box on runtime and i also want to display a textbox besides it so that i get the comments example : checklistbox "text" textbox...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.