Hi Sandeep,
There is no Style property for individual TreeNode class object, we need to
set each specific style attributes like Color, Border...... manually when
we want to customize a certain Node ......
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Can I use more than one style in a treeview control at the
roo
| thread-index: AcYLQB4fWyOFn3u/TXCPVaMnWO5DAg==
| X-WBNR-Posting-Host: 216.135.182.146
| From: "=?Utf-8?B?U2FuZGVlcA==?=" <Sa*****@discussions.microsoft.com>
| References: <12**********************************@microsoft.co m>
<kk**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Can I use more than one style in a treeview control at the
roo
| Date: Tue, 27 Dec 2005 15:49:03 -0800
| Lines: 93
| Message-ID: <B8**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367218
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi Steven
|
| Can you post a code to override the style in the server-side? I have the
| same problem as p3t3r has.
|
| I tried to set TreeNodeStyle in the TreeNodeDataBound eventm but the
| TreeNode does not expose, so I could not set the style. How can i set the
| style, please help.
|
| Thanks
| Sandeep
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi P3T3R,
| >
| > Welcome to ASPNET newsgroup.
| > As for the ASP.NET 2.0 TreeView control, the TreeNode style is arranged
| > based on Node level. So far I think we can only use Level Info to
specify
| > different Styles for TreeNode (We can use the LevelStyles to apply
| > different styles for individule levels...). For your scenario,
there're
| > some certain TreeNodes in a certain Level which you want to do some
| > cutomization, I think you may consider using some of the TreeView's
Events,
| > like TreeNodeDataBound, and do the customization work for the certain
| > Nodes in that event... Or you can also use TreeView's DataBound event
| > (whicn fires after TreeView has been bound with data) or the PreRender
| > event and locate the Nodes and change the style of them there....
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure!
www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| > --------------------
| > | Thread-Topic: Can I use more than one style in a treeview control at
the
| > root no
| > | thread-index: AcYKQXFFHbLdIR2lT6KgIMpD2LxKyg==
| > | X-WBNR-Posting-Host: 24.87.190.40
| > | From: "=?Utf-8?B?cDN0M3I=?=" <P3***@newsgroups.nospam>
| > | Subject: Can I use more than one style in a treeview control at the
root
| > no
| > | Date: Mon, 26 Dec 2005 09:26:01 -0800
| > | Lines: 20
| > | Message-ID: <12**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:367074
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | I have a treeview sourced from a SiteMap. I want to use 2 different
CSS
| > | styles for the root level nodes. The topmost root node should not
have a
| > top
| > | border, all the other root nodes should have a top border.
| > |
| > | Is it possible to have more than 1 style at the same level (parent
node)
| > | when using a SiteMap?
| > |
| > | I want it to appear something like this and I can only find a way to
| > either
| > | have the border on all root nodes or none at all. In addition to the
| > border,
| > | having a larger top margin on the other roots would also help the
| > appearance.
| > |
| > | root #1
| > | child 1.1
| > | child 1.2
| > | -----------------------
| > | root #2
| > | child 2.1
| > | -----------------------
| > | root #3
| > | child 3.1
| > |
| >
| >
|