sfbrown-hcso.tampa.fl
-
4/29/2011 1:23:31 PM
Is it possible to build a hierarchy structure using nested repeaters?
First off, I know that repeaters can nest. I've done it myself as well as seeing some of the articles.
My concern is to nest repeaters in order to create hierarchy.
This is what I am trying to accomplish. I am creating a phone list. This list includes internal and external numbers. The users as they create the contacts will be able to create folders in order organize the numbers in a standard tree structure. As a fake example...
US Government (container) Department of Defense (container) Army (container) General Smith (contact) Colonel Jones (contact) Airborn (container) General Lee (contact)
... and so on ...
So the users will be able to use containers to represent the structure using the folders. The depth of the containers depends on the organization. Contacts could occur at the root depth or down 4 or 5 levels. It all depends on what makes sense to the users.
Now, I am trying to represent this structure using a repeater nested in a transformation. For each container, it should display the containers within itself but slightly indented. Any child containers should do the same and so on...
This is a simple test transformation that I am working on. From the behavior I am seeing I am guessing that inside a dynamically created repeater, that the repeater is evaluated before the path is populated by the Eval.
Here is the test transformation. The transformation is called "HCSO.ContactContainer.TreeDisplay" so you will see that it creates a child repeater with the same template.
Anyone have any ideas?
<tr> <td colspan="2"><%# Eval("DocumentName") %></td> </tr> <tr> <td style="width:40px" /> <td> <table> <cms:cmsrepeater ID='ContactRepeater' runat="server" maxrelativelevel="1" visible="True" transformationname="HCSO.ContactContainer.TreeDisplay" path='<%# CMSContext.GetDocumentUrl((int)Eval("DocumentID")) %>/%' classnames="HCSO.ContactContainer" /> </table> </td> </tr>
|