CodeVerge.Net Beta


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

MS SQL 2008 on ASP.NET Hosting



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 8/31/2006 6:35:07 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 79 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
maflones
Asp.Net User
TreeView without expand icons, and ExpandDepth=08/31/2006 6:35:07 PM

0/0

Hi, i wonder if anyone could shed some light on this for me.

I have a treeview menu on my page that i can`t make work the way i want it to, and i am now wondering if i am barking up a tree withour cats..

I need a good old fashion menu that:

#1: Have the root nodes visible.

#2: Expands the tree AND submits the node link at the same time.

#3: Collapses all other root nodes when a different root is selected.

 Is this at all possible?

Thanx in advance,

Mattis

lostlander
Asp.Net User
Re: TreeView without expand icons, and ExpandDepth=09/1/2006 2:20:13 AM

0/0

Yes, you can.

#1, By default, the root node is visible as long as you have correct datasource( it shows the "title", make sure it's not null ). ( web.sitemap or xml file or ...).

#2, On TreeNodeExpand event, use Response.Redirect.

#3, see here: http://forums.asp.net/thread/1373511.aspx

Regards!^_^

maflones
Asp.Net User
Re: TreeView without expand icons, and ExpandDepth=09/1/2006 11:34:02 AM

0/0

Hi, Thanks for you reply..

#1: My setup is a DataSet in codebehind, a XML source in aspx, and a XSLT transformation is applied.. With this setup i assign a URL to the treeview that gets submitted upon click.. Do i need to supress this behaviour?

As per now the SelectedNodeChanged behaviour doesn´t even fire.. and thats where i need to make the treenode expand right?

#2: Where do i get the URL from? I cant´figure out a way to store the URL in the treeview so i can retrieve it in codebehind..

Btw, doesnt the treenodeexpand event require that i use the expand icons?

#3: Got it!

 

maflones
Asp.Net User
Re: TreeView without expand icons, and ExpandDepth=09/1/2006 11:52:53 AM

0/0

Btw; This is my Treeview code:

<asp:TreeView ID="TreeView1" runat="server" DataSourceID="xmlDataSource" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged" OnTreeNodeDataBound="TreeView1_TreeNodeDataBound" ExpandDepth="0" MaxDataBindDepth="10" OnTreeNodeExpanded="TreeView1_TreeNodeExpanded" PopulateNodesFromClient="False">

<DataBindings>

<asp:TreeNodeBinding

DataMember="MenuItem"

NavigateUrlField="NavigateUrl"

TextField="Text"

ToolTipField="ToolTip" PopulateOnDemand="True" SelectAction="SelectExpand" ValueField="Value" />

</DataBindings>

</asp:TreeView>

And this is my xsl:

<xsl:template match="Menu">

<MenuItem>

<!-- Convert Menu child elements to MenuItem attributes -->

<xsl:attribute name="Text">

<xsl:value-of select="Text"/>

</xsl:attribute>

<xsl:attribute name="ToolTip">

<xsl:value-of select="Description"/>

</xsl:attribute>

<xsl:attribute name="NavigateUrl">

<xsl:text>default.aspx?Sel=</xsl:text>

<xsl:value-of select="MenuID"/>

</xsl:attribute>

<xsl:attribute name="Value">

<xsl:value-of select="MenuID"/>

</xsl:attribute>

 

<!-- Call MenuListing if there are child Menu nodes -->

<xsl:if test="count(Menu) > 0">

<xsl:call-template name="MenuListing" />

</xsl:if>

</MenuItem>

 

</xsl:template>

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


Free Download:

Books:
Beginning ASP.NET 2.0 in C# 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1148, Published: 2006
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006

Web:
TreeView without expand icons, and ExpandDepth=0 - ASP.NET Forums TreeView without expand icons, and ExpandDepth=0. Last post 09-01-2006 7:52 AM by maflones. 3 replies. Sort Posts: ...
Maintaining treeview state across your site in a master page, and ... Disable ExpandDepth if the TreeView's expand/collapse .... Count = 0) Or node. Expanded.HasValue Or Not CBool(node.Expanded) Then ...
Experts Round Table Network - ASP.NET TreeView, maintain state and ... Disable ExpandDepth if the TreeView's expand/collapse ... 0 && node.Expanded. HasValue && node.Expanded == false) node.Expand(); ...
JoeAudette.com - ASP.NET TreeView PopulateNodesFromClient with ... If I set ExpandDepth=0 which is what you want when using populate on demand ... When its a postback (ie clicking the expand icon) the TreeView knows how far ...
.NET ASP.NET webcontrols TreeView Dynamic XML Binding Aspx page snippet: ExpandDepth="1"> When I click on the tree node (not the Expand icon) for the select processing, a null reference error ...
Tip: ASP.NET 2.0 Treeview - Expanding Nodes when Bound to SiteMap Clicking the + icon on a node causes the TreeNodeExpanded event to fire. ... Expand End If Best regards, Alejandro. # re: Tip: ASP.NET 2.0 Treeview ...
Display Hierarchical Data with TreeView in ASP.NET 2.0: ASP Alliance This has the effect that the expand/collapse icon is shown if the node has .... The most useful part was setting ExpandDepth="0" to TreeView, otherwise, ...
Koders Code Search: TreeView.cs - C# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR ..... 0) { foreach (TreeNode node in Nodes) node.Expand (ExpandDepth - 1) ...
Using the TreeView Control ToString("T") %>
Using treeview control to show hierarchical data from the database ...




Search This Site:










load treeview from sql query

masterpages and firefox (link, background images) issues

tree view postback

master page event not firing

set the page title by looking at the web.sitemap?

sitemap, menu and treeview question

setting the master page static

how to get the sub menu item can show over image elements?

asp.net master.page loading multiple content pages

having problems with masterpage

simple navbar user-control with state?

masterpage & formview - blanks out on postback

how do i get my attributes in menuitemclick (asp menu control)

treeview: re-click selected node

dynamic loading of master pages

skin file

target in masterpage

looking for new fields in parent nodes of a sitemap

treeview node selected problem.

textbox id from the repeater control inside a master page

treeview and xml -- suppress the first node

how to pass array in place of string title in sitemapnode with staticsitemapprovider

asp templates

several form tags in one page

stuck stuck stuck

jumbled controls on master page

changing menu control images dynamically

postback and controls rendering

referencing variables defined on master page

menu control's dynamic menus not showing - problem with webresource.axd

  Privacy | Contact Us
All Times Are GMT