TreeView Problem

D

Devinim SOLEN

Hi;

I try to apply stylesheet to treeview in Whidbey. It seems ok (applied) in
design mode but when it run, seems didn't apply, why ?

Here is the code as follows;

<asp:content id="MiddleContent" ContentPlaceHolderId="MiddleContent"
runat="server">

<asp:placeHolder ID="PlaceHolder1" Runat="server">

</asp:placeHolder>

<asp:TreeView Id="ChMainMenuTreeView" CssClass="ChMainMenu" Runat="server"
DataSourceID="ChMainMenuDataSource" ShowLines="True">

<databindings>

<asp:TreeNodeBinding TextField="Title" DataMember="Root">

</asp:TreeNodeBinding>

<asp:TreeNodeBinding TextField="Title" DataMember="Node">

</asp:TreeNodeBinding>

</databindings>

<LevelStyles>

<asp:TreeNodeStyle CssClass="ChMainMenuLevel1" Font-Underline="False">

</asp:TreeNodeStyle>

<asp:TreeNodeStyle CssClass="ChMainMenuLevel2" Font-Underline="False">

</asp:TreeNodeStyle>

<asp:TreeNodeStyle CssClass="ChMainMenuLevel3" Font-Underline="False">

</asp:TreeNodeStyle>

</LevelStyles>

</asp:TreeView>

<asp:XmlDataSource Id="ChMainMenuDataSource"
DataFile="./Code/ChMainMenu.xml" runat="server">

</asp:XmlDataSource>

</asp:content>



Thanks for your help.
 
Joined
Sep 16, 2006
Messages
2
Reaction score
0
TreeView and CssClass -- Another ASP.NET 2 bug

When CssClass is used in specifying ASP:Treeview elements
style="border-style:none;font-size:1em;"
is added to the "<a" tags within. As a result, no font-size specifics are effective.

I do not have a work around. Well...a couple of deep breaths helped me with the anger about such a seemingly inexplicable bug.

Chris
 
Joined
Mar 20, 2010
Messages
1
Reaction score
0
to work around that you just have tu use a.ChMainMenuLevel1 in your css file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top