Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2007

Tip: Looking for answers? Try searching our database.

Programmatically click on the treeview node

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sanjin - 28 Aug 2007 15:24 GMT
Is it possible to programmatically click (and make node checked also) on the
desired treeview (System.Windows.Forms.TreeView) node.

I.e. pseudo code:
myTreeview.Nodes[0].Click();

This code has to trigger the treeview  AfterCheck event.

Thanks in advance
Sanjin
Robbe Morris - [MVP] C# - 29 Aug 2007 03:01 GMT
You set the .SelectedNode property.  However, it sounds like
you've incorporated too much logic in the click event.

You should have a separate method that includes the logic
and is called in the click event.

Signature

Robbe Morris
.NET PropertyGrid Control - ListBox, ComboBox, and Custom Classes
http://www.eggheadcafe.com/tutorials/aspnet/270e9432-d236-47e7-b1af-5cd3abe27a75
/net-propertygrid-control.aspx


> Is it possible to programmatically click (and make node checked also) on
> the desired treeview (System.Windows.Forms.TreeView) node.
[quoted text clipped - 6 lines]
> Thanks in advance
> Sanjin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.