Hello there,
I think it shouldn't be this hard to solve this. But its not easy as it
seems to be. But there should be some way round it to do this.
In, simple words If I explain again what I really want to implement is : that I would like to
highlight the root node of the tree view control while browsing the child node.
For example, my tree view looks like following :
- Home
- Product List
- Product Details
And the
Web.Sitemap file :
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode title="Home" url="Home.aspx">
<siteMapNode title="Product List" url="ProductList.aspx" >
<siteMapNode title="Product Details" url="ProductDetails.aspx" />
</siteMapNode>
</siteMapNode>
</siteMap>
Now, if user selects the Product List - it gets highlighted and tree view looks like:
- Home
-
Product List
- Product Details
But, what steps I have to take or what I need to do, so that even I am browsing
Product Details, child node of the
Product list, my tree view still
highlights the
root node -
Product list and not its child node - Product Details and it also doesn't display the child node - Product Details too.
N, it makes my tree view some thing looks like :
- Home
-
Product List
I've come across to the other post on this forum and there I found the Following answer:
http://forums.asp.net/thread/1223453.aspx
if (e.item node == sitemap.currentnode.parent)
item.text = "<span class=\"selectedItemCSS\">" + text + "</span>";
But I am not sure where do I have to put this code?
So, if any one knows or have answer to this, plz reply.
Thanks in advance.
Vish.