ASP: Treeview - Non indenting

I am using master pages and have a limited width left hand content area to place a navigational "menu" for my website.

The "menu" has a root level and can go 3 children deep. I will be populating the "menu" from a Database programmatically:

Is it possible to use a treeview and override indenting so that no indenting occurs for the children.
Instead of this:
+A
+A1
A1a
+A1b
A1b1
A1b2
A1b3
A1c
A2
A3
B
C
D

I want this:
+A
+A1
A1a
+A1b
A1b1
A1b2
A1b3
A1c
A2
A3
B
C
D

I will use colors/styles to distinquish levels.

I also looked at groupbars but couldn't figure out how to programmatically populate them and if nesting was possible programmatically and not declaratively and have only 1 path expanded at a time.

2 Replies

AD Administrator Syncfusion Team January 5, 2007 06:19 PM UTC

When the sample posted it collapsed the leading spaces. So I put .'s to represent the spaces of what it is doing not what I want it to do
+A
..+A1
....A1a
...+A1b
.....A1b1
.....A1b2
.....A1b3
....A1c
...A2
...A3
.B
.C
.D


AD Administrator Syncfusion Team January 8, 2007 12:09 PM UTC


Hi,

Yes. You can achieve the no-indenting feature for the children either by using Menu Control or TreeView Control.

To achieve No-indenting feature :

using MenuControl : Set Menu's 'StaticSubMenuIndent' property as '0px'.

using TreeView Control : Set TreeView's 'LineImageWidth' property as '0px'.

Kindly please look into the Groupbar-Programmatic Creation Sample in the below link:
http://www2.syncfusion.com/syncfusion/infrastructure/samplebrowserasp/samples.aspx?version=2_0(Traverse to the following Sample: Tools.Web/GroupBar - BasicFeatures/Programmatic Creation.)

Regards,
Maheswari

Loader.
Up arrow icon