473,466 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

checkedListBox1.ClearSelected dosn't work properly

checkedListBox1.ClearSelected(),dosn't clear my selections in my
checkedboxlist.
How can I clear an specific item based on its value ,name or anything else?

thanks for your response.


Nov 21 '05 #1
4 3575
"Reza" <re**@microsoft.com> schrieb:
checkedListBox1.ClearSelected(),dosn't clear my selections in my
checkedboxlist.
How can I clear an specific item based on its value ,name
or anything else?

You can use the checkedlistbox's 'FindString' or 'FindStringExact methods to
get the index of a specific item, then you can use 'SetSelected(Index,
False)' to uncheck the item.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #2
Thanks,but it dosn't uncheck the item ,,it only removes the focus,that's it.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
"Reza" <re**@microsoft.com> schrieb:
checkedListBox1.ClearSelected(),dosn't clear my selections in my
checkedboxlist.
How can I clear an specific item based on its value ,name
or anything else?

You can use the checkedlistbox's 'FindString' or 'FindStringExact methods

to get the index of a specific item, then you can use 'SetSelected(Index,
False)' to uncheck the item.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3
"Reza" <re**@microsoft.com> schrieb:
Thanks,but it dosn't uncheck the item ,,it only removes the
focus,that's it.


Use 'SetItemChecked' instead of 'SetSelected'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4
how can I uncheck an item based on its memeber value?
"Reza" <re**@microsoft.com> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
checkedListBox1.ClearSelected(),dosn't clear my selections in my
checkedboxlist.
How can I clear an specific item based on its value ,name or anything else?
thanks for your response.

Nov 21 '05 #5

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

Similar topics

20
by: Chris Krasnichuk | last post by:
hello, Does anyone know how I make php work on "my" computer? I made a mistake in my last post so I fixed it here. Chris
14
by: glitter boy | last post by:
Ok so I have this class for C. I have to write this program for my instructor, where he has already posted the softcopy and algorithm. But my question is I have to convert meters to feet and in...
1
by: Reza | last post by:
checkedListBox1.ClearSelected(),dosn't clear my selections in my checkedboxlist.
2
by: ALI-R | last post by:
I am using the follwoing code to get all files which have txt as an extension but I get an error that your search pattern is not correct.it seems this fuction dosn't accept "*.txt" as search...
5
by: Ray Alirezaei | last post by:
Hi all When I copy and paste a piece of code from a web page into IDE ,,it is well formatted and instead of "<" or ">" characters "&alt" shows up.why is that ? Thanks for your help in advance....
4
by: Ahmed Hazzaa | last post by:
Hi all, I'm using the ASP.net 2.0 Beta 1, and in the html section of my page the asp tags dosn't appear, and i get a warning if i wrote them. Any help
14
by: Jonas.Holmsten | last post by:
Hello I'm porting some C++ stuff to C and having problem to get it through gcc. Here is a condensed version of the problem: void foo(const int * const * const ptr) {} main()
21
by: paitoon | last post by:
Hello there, The fuction $_SERVER; is nice to use but it so complicate for me... In my site to try to use this to add the information to database..but it work not correct because it will...
0
by: sourpo | last post by:
wonder if anyone can help... I have access db with a whole lot of vb code... If i use access 2000 it works perfectly but when using 2003 it doesn't work properly. The db copies outlook mailboxes......
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.