<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ClientEvents.aspx.cs" Inherits="TreeView_ClientEvents" %>
<%@ Register TagPrefix="APNSoft" Namespace="APNSoft.WebControls" Assembly="APNSoftControls" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    
    <script type="text/javascript">

    function ShowEvent(Event){
        try{
            var GrayBox=document.getElementById('GrayBox');
            GrayBox.innerHTML+='<br/>'+Event;
        }catch(ex){}
    };

    </script>
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    <a href="javascript:tv.ExpandAll('myTreeView');">Expand All</a>
    &nbsp;
    <a href="javascript:tv.CollapseAll('myTreeView');">Collapse All</a>
    <br /><br />

    <APNSoft:APNSoftTreeView id="myTreeView" runat="server"
        SkinFolder = "~/TreeView/Skins/Classic/"
        StructureFileURL = "~/TreeView/Structures/ClientEvents.xml"
        CheckBoxes = "true"
        ClientSideOnItemClick = "ShowEvent('The $Title$ ($ItemID$) is clicked!');"
        ClientSideOnCheck = "ShowEvent('The $Title$ ($ItemID$) is checked!');"
        ClientSideOnUnCheck = "ShowEvent('The $Title$ ($ItemID$) is unchecked!');"
        ClientSideOnExpand = "ShowEvent('The $Title$ ($ItemID$) is expanded!');"
        ClientSideOnCollapse = "ShowEvent('The $Title$ ($ItemID$) is collapsed!');"
    />
    
    
    <div class="GrayBox" style="left:300px;top:30px;width:350px;">
        <div><b>Event log:</b></div>
        <div id="GrayBox"></div>
    </div>
    




    </div>
    </form>
</body>
</html>