473,545 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TreeView and Checkboxes

Hello, Newsgroupians:

A quick question regarding checkboxes and a treeview. I have a treeview
that has the property CheckBoxes. However, I'm also trying to handle the
event NodeMouseClick. I only want the event to run some code only if the
user clicks the check box. This means that if the user clicks the "text" of
the TreeNode, it will do nothing. However, if the user clicks the checkbox,
which is next to the "text" the code will execute. I've been looking online
for how to accomplish this, but I have not found anything. Does anyone know
how I might accomplish this? Thank you.
Trecius
Sep 5 '08 #1
1 2017
"Trecius" <Tr*****@discus sions.microsoft .comwrote in message
news:BE******** *************** ***********@mic rosoft.com...
A quick question regarding checkboxes and a treeview. I have a treeview
that has the property CheckBoxes. However, I'm also trying to handle the
event NodeMouseClick. I only want the event to run some code only if the
user clicks the check box. This means that if the user clicks the "text"
of
the TreeNode, it will do nothing. However, if the user clicks the
checkbox,
which is next to the "text" the code will execute. I've been looking
online
for how to accomplish this, but I have not found anything. Does anyone
know
how I might accomplish this? Thank you.
It sounds like what you actually need is the way to determine when the node
is checked or unchecked (since that's what a click on the checkbox will do).
In which case, you should look at BeforeCheck and AfterCheck events of the
TreeView.
Sep 6 '08 #2

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

Similar topics

2
1761
by: Michael A. Covington | last post by:
Can somebody point me to an example of how to put checkboxes on a treeview? I want to set up something that is very much like the way tape backup programs let you select a set of files and/or directories. Thanks.
1
6255
by: Trevor | last post by:
How can I recursively loop through _every_ TreeNode in a TreeView using C#? The CheckBoxes property enables checkboxes for all TreeNodes. I only want checkboxes on TreeNodes that have 0 child nodes. I don't know how many levels deep the TreeView will be. I have the checkboxes part under control but my code only loops through the root nodes...
1
3248
by: nicholas | last post by:
I am using Obout TreeView: www.obout.com I would like to implement a page to add and remove categories to a product with the Obout Treeview with checkboxes. Does anyone allready did this and could help me with this?? Here is what I would like to do: -------------------------------- When the user selects a product, he can edit the...
2
292
by: Michael A. Covington | last post by:
Can somebody point me to an example of how to put checkboxes on a treeview? I want to set up something that is very much like the way tape backup programs let you select a set of files and/or directories. Thanks.
1
3308
by: Mark | last post by:
Hello, I am using the new TreeView in ASP.Net 2.0. I am using its PopulateOnDemand feature. The problem is that the treeviews +/- images, and any checkboxes, have the tooltip set. If the node contains HTML, then the tooltip shows the raw HTML, which is unacceptable to users. Is there any way to block the tooltips from displaying this...
0
7470
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7405
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7811
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7428
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7760
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3455
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1887
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 we have to send another system
1
1019
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.