DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Lock Listview and Treeview

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Lock Listview and Treeview

    [Originally posted by kenchen]

    Hello expert, how can i lock the listview and treeview object just like the textbox locked property.

    Because when the user having VIEW ONLY access right, they still can see the data but not modify them.

    I use these two controls by setting their Checkbox perperty to TRUE.

    One more thing, how can i disable a particular node in the treeview object, or make a particular node 's checkbox invisible ??

    Thank in advance

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Lock Listview and Treeview

    [Originally posted by Marcel Slooff]

    You can disable the label edit by setting the LabelEdit property to manual. Then the user can not edit the labels. The Event procedure NodeCheck can be used to catch user clicks on the checkboxes. In this event procedure you can also undo any checking or unchecking by the user. The event procedure also passes a reference to the node that's being clicked. Meaning you can also 'disable' specific nodes in the treeview.

    To ensure that a specific node is visible to the user you can call the EnsureVisible method of the Node object you want to show to the user. That goes something like this:
    Treeview1.Nodes(index).EnsureVisible

    Hope this explanation will do.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center