ok, here is what i have:
<cfquery name="orgs" datasource="#mydsn#">
select distinct organization as org
from orgs
order by 1
</cfquery>
<cfquery name="groups" datasource="#mydsn#">
select distinct organization as org, organizational_group as group
from orgs
where organization = '#orgs.org#'
order by 1, 2
</cfquery>
<cfform action="mytree_action.cfm">
<cftree name="mytree"
height="1600"
width="200"
bold="No"
italic="No"
border="No"
hscroll="No"
vscroll="No"
required="No"
completepath="Yes"
appendkey="Yes"
highlighthref="Yes">
<cftreeitem value="Organization"
display="Organization"
img="pls.gif" imgopen="mns.gif">
<cfloop query="orgs">
<cftreeitem value="#orgs.org#"
display="#orgs.org#"
parent="Organization"
img="pls.gif" imgopen="mns.gif">
</cfloop>
<cfloop query="groups">
<cftreeitem value="#groups.group#"
display="#groups.groups#"
parent="#orgs.org#"
img="mns.gif">
</cfloop>
</cftree>
</cfform>
this is 3 level tree and this is the result i want:
+Organization
+Group1
-Sub-Group1.1
-Sub-Group1.2
- ...
+Group2
-Sub-Group2.1
-Sub-Group2.2
-...
+....
However, the problem I have for now is ONLY Group1 works and got expanded into sub-groups (by clicking on plus sign/image), all Group2 and the rest of the Group are unclickable, and I can't see any sub-groups below them. how do put the loop so that ALL Group work and can be expanded??? thank you.....
<cfquery name="orgs" datasource="#mydsn#">
select distinct organization as org
from orgs
order by 1
</cfquery>
<cfquery name="groups" datasource="#mydsn#">
select distinct organization as org, organizational_group as group
from orgs
where organization = '#orgs.org#'
order by 1, 2
</cfquery>
<cfform action="mytree_action.cfm">
<cftree name="mytree"
height="1600"
width="200"
bold="No"
italic="No"
border="No"
hscroll="No"
vscroll="No"
required="No"
completepath="Yes"
appendkey="Yes"
highlighthref="Yes">
<cftreeitem value="Organization"
display="Organization"
img="pls.gif" imgopen="mns.gif">
<cfloop query="orgs">
<cftreeitem value="#orgs.org#"
display="#orgs.org#"
parent="Organization"
img="pls.gif" imgopen="mns.gif">
</cfloop>
<cfloop query="groups">
<cftreeitem value="#groups.group#"
display="#groups.groups#"
parent="#orgs.org#"
img="mns.gif">
</cfloop>
</cftree>
</cfform>
this is 3 level tree and this is the result i want:
+Organization
+Group1
-Sub-Group1.1
-Sub-Group1.2
- ...
+Group2
-Sub-Group2.1
-Sub-Group2.2
-...
+....
However, the problem I have for now is ONLY Group1 works and got expanded into sub-groups (by clicking on plus sign/image), all Group2 and the rest of the Group are unclickable, and I can't see any sub-groups below them. how do put the loop so that ALL Group work and can be expanded??? thank you.....