Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Treeview styling woes

1 view
Skip to first unread message

Ian

unread,
Mar 4, 2010, 8:09:35 AM3/4/10
to
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

unread,
Mar 4, 2010, 8:24:31 AM3/4/10
to

"Ian" <landi_...@hotmail.com> wrote in message news:...


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

Yes, it was dumb! You spend a week trying to figure something out and 20
seconds after hitting 'send' you think of the answer. The one thing I hadn't
thought of was the data. The data came from some old web pages that I'm
updating the site for, and the displayed field was surrounded by h3 tags!
Duh!

Anyway, I won't issue a cancel for this just in case someone else does
stupid things the same way that I do. :)

Cheers

Ian

0 new messages