0

I inherited a DNN site and am trying to figure it out. I have a page with a clickable header and then it branches into categories which are also clickable and show a name (it is a directory of people working at this company). The issue is that there is a small + and - to open and close these categories, but only these symbols work. Is there a way to make the symbol and the category title clickable to open or close the branch?

Here is the code from the page I am referring to:

<%@ Control language="C#" Inherits="Modules.PeopleNav.PeopleByDept" CodeFile="PeopleByDept.ascx.cs" AutoEventWireup="true"%>
<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1" 
    ExpandDepth="1"  
    onselectednodechanged="TreeView1_SelectedNodeChanged">
     <DataBindings>
     <asp:TreeNodeBinding DataMember="Person" ValueField="Value" TextField="Name">
      </asp:TreeNodeBinding> 
      <asp:TreeNodeBinding DataMember="Department" TextField="Name" >
      </asp:TreeNodeBinding>
   </DataBindings> 
</asp:TreeView><br />

<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/Portals/0/Docs/Department.xml"></asp:XmlDataSource>

I don't even know where the linking is taking place, as I am both a new programmer and brand new to DotNetNuke. If I need to post more code I will, I just don't want to go overboard with it. Thanks in advance!

Peter
  • 427
  • 4
  • 9
  • 37

1 Answers1

1

Use the TreeView's OnTreeNodeDataBound event to change the selection action.

   protected void TreeView1_NodeDataBound(object sender, TreeNodeEventArgs e)
    {
        e.Node.SelectAction = TreeNodeSelectAction.Expand;
    }
Dave D
  • 691
  • 5
  • 11