Link to home
Start Free TrialLog in
Avatar of sarankrishna
sarankrishna

asked on

How to Retain the check box value in Treeview control

I wanted to Retain the same value of the check box in a Treeview control when i click the check box of the node.

what i had did is

Private Sub tvwCompStruc_NodeCheck(ByVal Node As MSComctlLib.Node)
  Node.Checked = Not Node.Checked

End Sub

But the chekbox value is getting changed(I mean checking on and off is happening) while i click the check box of a node.



Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Hi sarankrishna,

Private Sub TreeView_NodeCheck(ByVal Node As MSComctlLib.Node)
    Node.Checked = Not Node.Checked
End Sub

is No problem at all..

Maybe you can check your code in NodeClick or Click Envent of Tree View control to ensure the Checked value is not changing..

regards.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi sarankrishna,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept mlmcc's comment(s) as an answer.

sarankrishna, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Avatar of Netminder
Netminder

Per recommendation, force-accepted by
Netminder
Community Support Moderator