Last post Jul 01, 2009 08:29 AM by mroonal
May 12, 2006 09:15 AM|HardMike|LINK
I downloaded and added support for css friendly controls. Everything works except for a issue with the treeView. When I click a linked node and post to the page the treeView collapses instead of selecting the node. When I exclude the CSSFriendly.browsers
from my project it works again. Any suggestions on this cause I really need this functionality.
May 12, 2006 12:56 PM|Russ Helfand|LINK
Hi Mike, can you help me better understand the issue here? If you are observing that the adapted TreeView doesn't retain a memory of its state-of-expansion after posting back... then this is a known limitation of the current TreeView adapter. It's already
something that I've got on the to-do list for a future rev of this sample kit. Basically, it involves sending a bit more info (concerning what is expanded) back to the server during these postbacks so the server can restore the expansion state when the page
is sent back down.
There is some intersection between this feature and another to-do item: populating the TreeView nodes upon demand, rather than always having all the nodes defined all the time. Hopefully, we can nail both of these enhancements to the adapted TreeView code
in a not-too-distant rev of the adapter kit.
Meanwhile, maybe someone in the community of forum readers would like to suggest some code we could stick in the current CSSFriendly.MenuAdapter with some cut-n-paste magic.
May 15, 2006 05:06 AM|HardMike|LINK
I´m aware of that the treeView doesn´t remember it´s state of expansion and I know of the workarounds. To be honest I´m not sure why this works for me(I don´t fix what isn´t broken) but the code below does the trick with no code beside.
<asp:TreeView ID="articleTreeView" runat="server"
Without CssFriendlyAdapters this selects the node and expands the tree after postback. With CssFriendlyAdapters the tree closes and the current node
isn´t styled as selected. The SiteMapPath connected to the same provider however shows the correct path. Any suggestions because I need the css functionality to style my tree.
Oct 26, 2006 12:02 PM|Russ Helfand|LINK
Jan 21, 2008 01:11 AM|fandibong|LINK
How can I put CSS Friendy Tree View Expansion State into memory?
For example, say I have a Tree View and when you click on the node it will navigate to other page (not just post back to same page) and on that next page I want to display the selected Tree Node.
The only way I think it could be done is if I attach to TreeNodeCollpased and TreeNodeExpanded event and put the expansion state in Session then display it on the other page. The problem is I cant attach to these 2 events (could be because I use CSS Friendly
Jul 01, 2009 08:29 AM|mroonal|LINK
Can we apply css to Treeview... node level wise...?
One css to Parent Nodes,
One css to second level nodes. (Same css shd b applied even if it is leaf node)