CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 4/27/2007 4:45:58 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 16 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
jollyguy77
Asp.Net User
Treeview events4/27/2007 4:45:58 AM

0/0

hi,

    i am using a treeview control in asp.net 1.1. i have created a website where i have a treeview and when a user clicks on any node , the data is shown on the right. i have written code that the treeview is always in expanded mode. i have a situation that whenever a user clicks on the parent node, the parent node get collapsed and the get expanded. i would like the user to feel that the treeview control is not used on the page. i have used AUTOPOSTBACK = TRUE , SELECTEXPANDS = FALSE , SHOWPLUS = FALSE. i have tried using the COLLAPSE method also. it doesnot work.can u tell me how to avoid it.

 

please find the code below

private void Page_Load(object sender, System.EventArgs e)
  {
      
   
   if(!IsPostBack)
   {
    TreeView1.TreeNodeSrc = "aaa.xml";
    TreeView1.DataBind();
   }
   
  } 

private void TreeView1_SelectedIndexChange(object sender, Microsoft.Web.UI.WebControls.TreeViewSelectEventArgs e)
  {
   string sel;
   sel = e.NewNode;
    
   TreeSelLoadPage(sel);
  }

private void LoadContent(string pageLoad)
  {
   string filename =pageLoad;
   if(pageLoad.LastIndexOf('#')>0)
   {
    filename = pageLoad.Substring(0,pageLoad.LastIndexOf('#'));
   }
   if(File.Exists(Server.MapPath(filename)))
   {

    string showPage = "<script>document.getElementById('doc').src='" + pageLoad + "'</script>";
    RegisterStartupScript("1",showPage);
   }
  }


  private void TreeSelLoadPage(string nodeID)
  {
   TreeNode node = TreeView1.GetNodeFromIndex(nodeID);
//   string strDir = Server.MapPath(node.NodeData.ToString());
   string strDir = node.NodeData.ToString();
   LoadContent(strDir);
  }
 

private void ExpandAllNodes(TreeNode pNode)
  {
   pNode.Expanded = true;
   if(pNode.Nodes.Count >0)
   {
    foreach(TreeNode tn in pNode.Nodes)
    {
     ExpandAllNodes(tn);
    }
   }

  }

// code where the treeview is in expanded mode


  private void EnSuite_PreRender(object sender, System.EventArgs e)
  {

   foreach (TreeNode tn in TreeView1.Nodes)
   {
    ExpandAllNodes(tn);
   }

   //TreeView1.ExpandLevel = 3;
  }

 

 

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


Free Download:

Books:
Programming Visual Basic .NET Authors: Jesse Liberty, Dave Grundgeiger, Pages: 541, Published: 2003
Learning C# 2005: Get Started with C# 2.0 and .NET Programming Authors: Jesse Liberty, Brian MacDonald, Pages: 528, Published: 2006
Programming C# 3.0 Authors: Jesse Liberty, Donald Xie, Pages: 607, Published: 2007
Pro .NET 2.0 Windows Forms and Custom Controls in C#: From Professional to Expert Authors: Matthew MacDonald, Pages: 1037, Published: 2005
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Core Internet Application Development with ASP.NET 2.0 Authors: Randy Connolly, Pages: 1049, Published: 2007
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Programming Visual Basic 2005 Authors: Jesse Liberty, Pages: 548, Published: 2005
Visual Basic 6 Complete Authors: Steve Brown, Pages: 1040, Published: 1999
QuickTime for .NET and COM Developers Authors: John Cromie, Pages: 341, Published: 2006

Web:
TreeView Events (System.Web.UI.WebControls) TreeView Events. Updated: November 2007. The TreeView type exposes the following members. Events. Name, Description. dfa9c56t.pubevent(en-us,VS.90).gif ...
TreeView Events (System.Windows.Forms) .NET Framework Class Library. TreeView Events. Updated: November 2007. The TreeView type exposes the following members. Events ...
Know Dot Net - Handling TreeView & ComboBox Click Events How to get the selected node when the AfterSelect event does not fire.
Neowin Forums > [C#] Clicking Treeview Node Events.. as I remember there is no events like that. What you have to do is to check if any node is selected in the treeview control and do things accordingly. ...
Prevent a TreeView from firing events in VB6? - Stack Overflow I can think of multiple ways to skin this cat, but what seems simplest to me is to tell the TreeView not to raise events for some period of time. ...
Treeview Events and References : treeview, events I am working with a Treeview for the first time, and would like to do the following: I have a Treeview control on a form with a subform containing a tab ...
Observe tree view events This document describes how to observe tree view events. Issue How do I observe the following tree view events? when the tree view collapses and expands ...
Using the server-side events - r.a.d.treeview Information about the rest of the server-side events supported by r.a.d.treeview can be found in the help docs r.a.d.treeview Server-side section . ...
TreeView Control - TreeView Events You can use several events of the TreeView control to code for actions taken by the user or to handle actions caused by code execution.
obout inc - ASPTreeView - Treeview - Using server-side events Free ASP Treeview - Incredibly fast. Unlimited nodes. Very easy to use. Lots of features and examples. Cross-browser. - Treeview - Using server-side events.

Videos:
Structuring Personal Information When Everything Can Be Saved and Searched... Google TechTalks May 17, 2006 William Jones William Jones is an Research Associate Professor in The Information School at the University of Washingt...




Search This Site:










unable to add selected web part

editing format of "pubdate" in news feed rss

dnn2: tired of trying to make users online work

developing a validator control

skmmenu against sql server db ?

problems with reading ansi text file...

vslive - s.f.

prevent user from posting data back from a saved page

how to get the textbox values into a vb-script

dnn - robust enough for a business?

help (quick answer please) code that runs in the skin

intranet application / windows authentication

dou you want to localize tab names, titles a descriptions? (free?)

ny e-book 2 getstarted

problem to access network resources although impersonated user account

where to get the patches for the visual studio.net 2005 beta ii

new form - new to .net and portal

howto: numerous dnn portals

javascript object expected error, master pages & detailsview conflicting?

all i want is an example to decode a base64 string to a string.

reference menuitems in javascript

data poll every 5 second.

questions for a few dnn pros... i'm vision casting and need help on identifying the limitations of the dnn framework!

remember me check box 2.0 membership not working

get current windows username

visual studio 2005 locks / freezes with devenv 100% - css problem?

install problem - is it asp.net ?

total frustration

special date format

how does dnn handle web farms and sql session state?!?

 
All Times Are GMT