CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.internet_explorer_web_controls Tags:
Item Type: NewsGroup Date Entered: 4/21/2004 3:28:39 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 40 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
rajendra937
Asp.Net User
TreeView Event Handling4/21/2004 3:28:39 AM

0/0

Hi,

Is there an event "onclick" for TreeView IE web control?

I want to write an event handler for when I click on a node that has child nodes, it should expand.

That is the user can either click on the + sign to expand the node or might expand by just clicking on the text too.

could anybody please help me with this? and also, what is the best way to store a treeview so that I don't have to re-populate the treeview from database everytime. If storing in a view state is best, then how to store it in viewstate and how to delete from it when required?

Any help is greatly appreciated. will be eagerly waiting for a reply.

Thankyou.



bitTwiddler
Asp.Net User
Re: TreeView Event Handling4/21/2004 2:04:28 PM

0/0

There is no onclick event (a possible exception might be that gifted individual who could hack the javascript in the htc file ;-))

Check out the reference <a href="http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/webcontrols_entry.asp"</a>. The events are listed under the TreeView object in the TreeView Webcontrol Reference, as are the arguments. You should be able to see the events on the dropdowns in your code-behind page.

SelectExpands=true will expand a node by clicking the text. No events are fired from a node with a NavigateUrl (that one cost me some time).

Hope this helps.
rajendra937
Asp.Net User
Re: TreeView Event Handling4/21/2004 3:46:55 PM

0/0

Hi Twiddler,

thanks for your reply.

SelectExpands = true is working for me.


Could you please tell me how to maintain the state of TreeView, so that I don't have to re-populate the treeview from database everytime i go to a different page.

I read somewhere, that one can store the treeview in viewstate.....but I don't know how.

And also how to delete from it when required.

Will be eagerly waiting for your reply.

Thanks once again.

Raj.
whirlpool
Asp.Net User
Re: TreeView Event Handling5/27/2005 4:59:19 PM

0/0

This works (dont ask me why):

 Put this in your .ASPX page:

   <SCRIPT lang="jscript" >
   
   function Treeview1_onclick(  )
   {
    alert("onclick" );
   }
   var treeclick=Treeview1_onclick;
   </SCRIPT>
   <ie:TreeView runat="server" SystemImagesPath="/webctrl_client/1_0/treeimages" ID="Treeview1"  onclick="treeclick()" >
    <ie:TreeNode TreeNodeSrc="xml/menu_ProductionReports.xml" Expanded="true" ImageUrl="/webctrl_client/1_0/images/root.gif"
     Text="My Tree"></ie:TreeNode>
   </ie:TreeView>

 

4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Programming C# 3.0 Authors: Jesse Liberty, Donald Xie, Pages: 607, Published: 2007
Programming C#: Jesse Liberty Authors: Jesse Liberty, Pages: 689, Published: 2003
Learning C# 3.0: Get Started With C# 3.0 2008 and .NET Programming Authors: Jesse Liberty, Brian MacDonald, Pages: 576, Published: 2008
Core Internet Application Development with ASP.NET 2.0 Authors: Randy Connolly, Pages: 1049, Published: 2007
Pro .NET 2.0 Windows Forms and Custom Controls in VB 2005 Authors: Matthew MacDonald, Pages: 1036, Published: 2006
Visual Basic .NET Database Programming: database programming Authors: Rod Stephens, Pages: 416, Published: 2002
Learning C# 2005: Get Started with C# 2.0 and .NET Programming Authors: Jesse Liberty, Brian MacDonald, Pages: 528, Published: 2006
Programming .NET Windows Applications Authors: Jesse Liberty, Dan Hurwitz, Pages: 1228, Published: 2004
Pro .NET 2.0 Windows Forms and Custom Controls in C#: From Professional to Expert Authors: Matthew MacDonald, Pages: 1037, Published: 2005
Visual C# 2005 Recipes: A Problem-Solution Approach Authors: Allen Jones, Matthew MacDonald, Rakesh Rajan, Pages: 565, Published: 2006

Web:
Creating event handlers for tree view For the Tree View component, you can create event handlers for the individual nodes or for the tree as a whole at a global level.
TreeView.BeforeExpand Event (System.Windows.Forms) Public Event BeforeExpand As TreeViewCancelEventHandler. Visual Basic (Usage). Dim instance As TreeView Dim handler As TreeViewCancelEventHandler AddHandler ...
TreeView Event Handling - ASP.NET Forums Is there an event "onclick" for TreeView IE web control? I want to write an event handler for when I click on a node that has child nodes, it should expand. ...
Event Handling TreeView - C# - Forums at ProgrammersHeaven.com Jul 18, 2006 ... Event Handling TreeView: I'm looking to add event handling to the nodes within a TreeView. I have not found any useful examples/tutorials ...
Tree View Double Click Event Handler not working properly Tree View Double Click Event Handler not working properly - Microsoft Dot NET Framework Forms. Visit our forum to discuss Tree View Double Click Event ...
YUI4JSF - Apr 15, 2008 ... TreeView component can invoke your server side event handling methods when an item clicked, expanded or collapsed. Since it calls your event ...
Know Dot Net - Handling TreeView & ComboBox Click Events How to get the selected node when the AfterSelect event does not fire. ... Handling TreeView & ComboBox Click Events. AfterSelect Event Does Not Fire When ...
Delayed event handling for WinForms applications - VBInfoZine Article Jun 8, 2005 ... Now suppose that we want to postpone the TreeView.AfterSelect event handling to accommodate for fast keyboard-driven navigation. ...
Kevin Hurwitz: A little help with the .NET WinForms TreeView Jul 12, 2008 ... Second, there is no ideal event for handling what would seem to be the most basic TreeView event - a user selecting a node. ...
[MonoDevelop] Stetic add-in and treeview widget event question Apr 9, 2006 ... Just as a simple test what I am trying to do is add a treeview to my ... So far my event handlers work ok for the >> KeyReleaseEvent but ...




Search This Site:










error while running build.bat

report your bugs 2.0

ad tree view

tree doesn't show up.its just text string

has anyone used ie controls on nt 4.0 web server iis 4.0?

iewc does not render proper xml and tsns code

unable to download ie web controls

any way to show/print all tabs in tab+multipage

tabstrip css text vs cssclass

dropdownlist values in pageview

install of ie web controls

microsoft tree view dns host name mismatch

tabstrip posts back when new tab selected

progmatically selecting a treeview treenode...

treeview displayed as plain text on some machine

microsoft.web.ui.webcontrols.dll

a script on this page casuing internet explorer to run slowly.if it continues to run,ur computer may become unresponsive.

the treeview control is very slow

internet explorer web controls

ie control issues

iewebcontrols not working

re: treeview displaying as just text on web server

expand treenode through code

tabstrip & client-side event ?

treeview control

how to get an event handler in tabstrip / multipage web control

treeview: how to navigate to a node

problems with installation / vs.net toolbox

navigate to another page with tabstrip

c# treeview of all community's sections

  Privacy | Contact Us
All Times Are GMT