CodeVerge.Net Beta


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




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: 5/10/2006 9:14:41 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 3 Views: 50 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
wqiu21
Asp.Net User
TreeView SelectedNode style problem.5/10/2006 9:14:41 AM

0

I set up the SelectedNode style through the TreeView properties - Styles - SelectedNodeStyle - BackColor to yellow.

The selected node style works when the node's navigateUrl is null. However, I set up a page link(navigateUrl) to the node. the style will never work again.

I implemented the website with master pages. the TreeView is in the master page and TreeNode is linking the content page.

Can anyone tell me what causes the SelectedNode style not work?

Thanks so much in advance! thanks to this forum!

John

dannychen
Asp.Net User
Re: TreeView SelectedNode style problem.5/10/2006 3:02:06 PM

0

John,

  You are confusing Navigation with Selection.  Selecting a node is a function of posting back to the same page.  When you click on a link with a NavigateUrl set, you are navigating to a new page.  This can sometimes confuse people when used with a masterpage.  A masterpage is just a template, it does not maintain state between navigations. 

  That said, if you bind to a SiteMapDataSource, there is special code which can autoselect the current node.  Alternatively, if you write a similar piece of code in a Load event for your TreeView, you can cause a node to become selected and your style to appear.

--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
wqiu21
Asp.Net User
Re: TreeView SelectedNode style problem.5/12/2006 3:05:32 PM

0

Hi Danny,

Followed your advice. I checked the process the application go through after I clicked a tree node. Easily I realised that the node needs to be re-selected programmatically when the master page is re-load. This issue has been solved. Thanks very much for your kind help! :)

sixtus
Asp.Net User
Re: TreeView SelectedNode style problem.8/20/2006 11:12:43 AM

0

I have the same problem, but I have some difficulties re-select the selected node using code. If someone could give me some code I would be very happy.

I am using VB.

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


Free Download:

Books:
Pro .NET 2.0 Windows Forms and custom controls in C# Authors: Matthew MacDonald, Pages: 1037, Published: 2005
Pro .NET 2.0 Windows forms and custom controls in VB 2005 Authors: Matthew MacDonald, Pages: 1036, Published: 2006
MASTERING MICROSOFT VISUAL BASIC 2008 Authors: Evangelos Petroutsos, Pages: 1152, Published: 2008
Student's essential guide to .NET Authors: Tony Grimer, Pages: 366, Published: 2004
Mastering Visual Basic .NET Authors: Evangelos Petroutsos, Pages: 1153, Published: 2002

Web:
TreeView SelectedNode style problem. - ASP.NET Forums I set up the SelectedNode style through the TreeView properties - Styles - SelectedNodeStyle - BackColor to yellow. The selected node style ...
asp.net 2 treeview SelectedNode Style Not Working On Client Talk about asp.net 2 treeview SelectedNode Style Not Working On Client. ... The treeview correctly shows the selected node in the style ...
TreeView.SelectedNode Property (System.Windows.Forms) Gets or sets the tree node that is currently selected in the tree view control.
TreeView SelectedNode - problem C# Friends Learn the c# langauge to build web applications using our online tutorials with live demos. Participate in our forums and learn from others.
Treeview selectednode problem/question - bytes Hi, David curnode cannot be for selection after you clear list of nodes in treeview. It's not present anymore in treeview. HTH Alex "David.

Treeview selectednode does not do what I expect - ng.asp-net-forum ... asp.net 2 treeview SelectedNode Style Not Working On Client Talk about asp.net ... TreeView adapter problem - microsoft_downloads ... treeView.SelectedNode ...
Programmatically setting the selected node in SiteMapDataSource ... Programmatically setting the selected node in SiteMapDataSource, ... My problem is not with the tree view, the sitemapdataprovider or ...
HOW TO: Expand Tree to SelectedNode - ng.asp-net-forum ... The following code allows you to automatically open a TreeView control that is being used for ... and that's it, VB style. Again, thanks for the solution, IthraelArlet! ... problem to add a local component reference! ...
TreeView adapter problem - microsoft_downloads ... TreeView adapter problem, > ROOT > NEWSGROUP > Asp.Net Forum ... treeView. SelectedNode; selectedNode.Selected = true; // does not raise the ...
TreeView OnSelectedNodeChanged does not execute - ng.asp-net-forum ... public void SelectedNodeChanged(object sender, EventArgs e) {TreeView1. SelectedNode.Selected = true;}. My problem is that the ...






master pages and viewstate

can't find user control

querystring to choose content page by linkbutton

knowing what node was selected in a treeview.

sitemapnode roles doesn't seem to work

how to do this

treeview directory listing on file share

asp sitemap

access controls in user control on a master page

staticmenuitemstyle

problem with masterpage

how can i put more than one link in a treeview node?

masterpage and headers?

opening page in iframe along with masterpage

menuitemclick event not raised???

adding dropdowns programatically to content page in master page and retrieving selected value in code behind

help with treeview (asp.net 2.0)

staticsitemapprovider and external links

html encoding in the treenode.text property

master page content firefix problem

how to highlight parent also when the child is selected to show the selection hierarchy in the treeview

masterpage - contentplaceholder

caching problem with treeview in usercontrol

path not found when including a javascript file in web page

opera/firefox and master page

menu control that binds with a database

skin file overrules specific tags

selected hyperlink will change color

detecting fragment identifier / anchor in url ?

not really getting asp:menu + roles

   
  Privacy | Contact Us
All Times Are GMT