CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 6/29/2007 3:12:33 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 58 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
wizbay
Asp.Net User
[TreeView] How to set font=bold for root node without child node?6/29/2007 3:12:33 PM

0/0

I have treeview with 3 nodes with some child nodes.

Node1 - (Node11, Node12)

Node2 - (Node21, Node22, Node23)

Node3

 

Node1 and Node2 has child nodes but Node3.

How to set font=bold for root node without child node?

I want to set font=bold for all root nodes.

joteke
Asp.Net User
Re: [TreeView] How to set font=bold for root node without child node?6/30/2007 6:50:58 AM

0/0

You'd iterate through Nodes collection and check that node does not have parent nodes (which makes it root node?) in case you don't populate the tree dynamically and you need to do this programmatically.

But TreeView also has RootNodeStyle which you can set directly in markup: RootNodeStyle-Font-Bold="True"


Thanks,

Teemu Keiski
Finland, EU
Talha.Majeed
Asp.Net User
Re: [TreeView] How to set font=bold for root node without child node?6/30/2007 10:56:17 AM

0/0

Hello,

You can do it very easily by iterating through the root nodes.

foreach ( TreeNode node in treeview1.Nodes )
{
 if ( node.ChildNodes.Count.Equals ( 0 ))
 {
  node.Text = "<B>" + node.Text + "</B>";

 }
}

Hope this solves the problem.


Talha Majeed
Software Engineer
Kalsoft ( Pvt. ) Ltd.

Cell: +92-333-4156026
Email: [email protected]
Web: http://www.ekalsoft.com
small
Asp.Net User
Re: [TreeView] How to set font=bold for root node without child node?1/14/2008 3:38:35 AM

0/0

Hi,

I have a problem on set the selected node to bold after setting the selected node to false -> TreeView.SelectedNode.Selected = False in order to be able to call the SelectedNodeChanged on the same node twice. It causes TreeView.SelectedNodeStyle.Font.Bold = True to have no effect. I have tried to set the treenode.Text = "<b>" & treenode.Text & "</b>", it will always be bold after postback. Could anyone kindly advise on the solution? Many thanks..

 Small

4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005

Web:
[TreeView] How to set font=bold for root node without child node ... [TreeView] How to set font=bold for root node without child node? Last post 01- 13-2008 10:38 PM by small. 3 replies. Sort Posts: ...
How can I change the Font.Bold in Treeview Control - MSDN Forums Sep 5, 2006 ... I have a Treeview Control that I load all root Nodes and its Child, but now I want the Root Node Font to be Bold and the Child to be Normal, ...
Bits N Bytes: Of TreeView Nodes and their Fonts 'TreeView Initialization. I only want the root node to be bold, but I set the default FontStyle to Bold. Me.tvwItems.Font = New System.Drawing.Font _ ...
VB.Net TreeView - Changing the Node Font Color and Bold property ... How do I change the font color and bold property on a VB.Net TreeView node? Basically, I want to display the root node in bold red font, the child nodes in ...
ASP.NET Tutorial Root nodes are the main nodes, Parent nodes have lower-level Child nodes, ... This TreeView has its ImageSet property set to "Arrows" for its menu expansion ...
CodeProject: How to set focus to a MS ASP.NET TreeView on form ... Here is a list of problems trying to set focus to the Microsoft ASP. .... TreeView that is in the IEControls it show root node and child node in designer ...
TreeView ActiveX Control-Autodesk MAXScript Reference-kxcad The #tvwTreeLines mode shows the root nodes without connection lines and draws lines ... Defines the Font used by the TreeView. Cannot be set by MAXScript. ...
CodeGuru Forums - [TreeView] Child Nodes Reload this Page [TreeView] Child Nodes ... Expanded = True Test.Bold = True Set Test2 = TreeView1.Nodes.Add(, , "Testing2, "Testing2") ...
DotNetBips.com :: Blossom your .NET skills Aug 17, 2008 ... Set the DataSourceID property of the TreeView to SiteMapDataSource1. ... Here, we first get the total number of child nodes of the root node ...
[VBnet ComCtrls] SetWindowLong: Apply TreeView Special Effects Nodes.Add("C31", tvwChild, "C321", "Child 3 SubC 1 SubC 1") Set nodX = TV1. ... treeview items, change the font of individual items, set individual item ...




Search This Site:










weird problems with iis on vista due to vss "previous versions"???

moss development on 64 bit server

how to alter default code commenting snippet?

flash in skin

redirecting users after login

simple approach to encrypt a sq variable

editing the security question and answer (login control)

i'm not getting data on page

membership system for a blog

links in masterpage - how to determine which one was clicked

master page update from lightbox

add adapters

object reference not set to an instance of an object

vs 2005 beta 2 does not have ususal templates

calling the brightest for expert install question

refactoring tools made useless

deploy asp.net 2.0 memebership database

dnn 3.1 pages blowing up...a lot!

free source control

web site administration tool

nested master pages left centre and right. all different aspx pages.

web deployment projects

does anyone have a working sqltableprofileprovider working in vwd c#

help (unable to add data connection)

aumatical update password

personalization problem, not sure if this is the right forum, but please help!

users online + where are they dnn 3.x: my experience of no creativity ;)

not understanding master page and content area issue - newbie question

v1.10d

dynamic globresource request

 
All Times Are GMT