Treeview styling woes

Discussion in 'ASP .Net Web Controls' started by Ian, Mar 4, 2010.

  1. Ian

    Ian Guest

    Hi all

    I hope this isn't too dumb a problem. I wonder if someone could please point
    out what I'm doing wrong.

    I have a TabContainer with several tabs and some of them have Treeviews on -
    let's assume 3 Tabpanels, 3 Treeviews.

    All Treeviews are populated in the same way (it's copy & paste) and are all
    styled, etc the same way, again copy & paste. They all look identical when I
    fire the thing up. When I expand to leaf level, Treeviews 2 & 3 are fine,
    but the leaf text on Treeview #1 is bold, which is not required. I guess
    that I'm missing *something* stupid, but I can't see what. #1 text *should*
    be identical to the leaf text on #2 & #3.

    I know we all like a bit of code, so here goes. :) I've just included
    Treeviews 1 & 2.

    <cc1:TabPanel runat="server" HeaderText="Cases"
    ID="TabPanel1">
    <ContentTemplate>
    <div class="tabpanel">
    <div class="navbar">
    <asp:TreeView ID="TreeView1"
    EnableClientScript="true" PopulateNodesFromClient="true"
    runat="server"
    OnTreeNodePopulate="Populate1" Font-Names="Verdana, Arial">
    <LevelStyles>
    <asp:TreeNodeStyle
    ChildNodesPadding="10" Font-Bold="false" Font-Size="14pt"
    ForeColor="DarkGreen" />
    <asp:TreeNodeStyle
    ChildNodesPadding="2" Font-Bold="false" Font-Size="8pt" />
    <asp:TreeNodeStyle
    ChildNodesPadding="2" Font-Bold="false" Font-Size="6pt" />
    </LevelStyles>
    <Nodes>
    <asp:TreeNode Text="1"
    SelectAction="Expand" PopulateOnDemand="true" />
    </Nodes>
    </asp:TreeView>
    </div>
    <div>
    &nbsp;
    </div>
    </div>
    </ContentTemplate>
    </cc1:TabPanel>
    <cc1:TabPanel runat="server" HeaderText="Victims"
    ID="TabPanel2">
    <ContentTemplate>
    <div class="tabpanel">
    <div class="navbar">
    <asp:TreeView ID="TreeView2"
    EnableClientScript="true" PopulateNodesFromClient="true"
    runat="server"
    OnTreeNodePopulate="Populate2" Font-Names="Verdana, Arial">
    <LevelStyles>
    <asp:TreeNodeStyle
    ChildNodesPadding="10" Font-Bold="false" Font-Size="14pt"
    ForeColor="DarkGreen" />
    <asp:TreeNodeStyle
    ChildNodesPadding="2" Font-Bold="false" Font-Size="8pt" />
    <asp:TreeNodeStyle
    ChildNodesPadding="2" Font-Bold="false" Font-Size="6pt" />
    </LevelStyles>
    <Nodes>
    <asp:TreeNode Text="2"
    SelectAction="Expand" PopulateOnDemand="true" />
    </Nodes>
    </asp:TreeView>
    </div>
    <div>
    &nbsp;
    </div>
    </div>
    </ContentTemplate>
    </cc1:TabPanel>

    I won't include the VB populate bits as they are identical except for an SQL
    string, again C&P.

    All I have done is basically put some M$ examples together while I try and
    get a handle on all this ASP stuff - I come from Delphiland.

    Anyway, all free clues most gratefully accepted before I go completely
    insane.

    TIA

    Ian
     
    Ian, Mar 4, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roshawn

    Styling a control

    Roshawn, Aug 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    383
    clintonG
    Aug 21, 2004
  2. Josh

    TreeView woes in VS2005

    Josh, Jun 18, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    440
    Mark Rae
    Jun 19, 2007
  3. Sylvie
    Replies:
    0
    Views:
    448
    Sylvie
    Oct 10, 2007
  4. pbd22
    Replies:
    1
    Views:
    306
    pbd22
    Nov 19, 2007
  5. Mike Collins

    Treeview Styling

    Mike Collins, Jun 27, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    457
    Mike Collins
    Jun 30, 2008
Loading...

Share This Page