AfterClientCheck and AfterClientClick not firing/hitting correct js function

2 posts, 0 answers
  1. Eric Carlson
    Eric Carlson avatar
    12 posts
    Member since:
    Nov 2005

    Posted 12 Oct 2011 Link to this post

    I'm trying to use the AfterClientCheck javascript event on a simple test page in a VS2008 test project, but it's not working.  OnClientMouseOver is working just fine, so javascript is working.

    Any thoughts?

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="myNamespace.WebForm1" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <head runat="server">
        <title></title>
        <script type="text/javascript">
            function test(input, args) {
                alert("test");
            }
     
            function AfterCheckHandler(node) {
                alert("You have checked " + node.Text + " which is now " + node.Checked);
            } function AfterClickHandler(node) {
                alert(node.Text);
            }
     
     
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
            <telerik:RadTextBox ID="RadTextBox1" runat="server" ClientEvents-OnKeyPress="test">
            </telerik:RadTextBox>
            <telerik:RadTreeView ID="RadTreeView1" CheckBoxes="True" runat="server" AfterClientClick="AfterClickHandler"
     AfterClientCheck="AfterCheckHandler" OnClientMouseOver = "test">
            <Nodes>
                        <telerik:RadTreeNode runat="server" Text="Books" ExpandMode="ClientSide">
                            <Nodes>
                                <telerik:RadTreeNode runat="server" Text="Fiction">
                                </telerik:RadTreeNode>
                                <telerik:RadTreeNode runat="server" Text="Non-Fiction">
                                </telerik:RadTreeNode>
                            </Nodes>
                        </telerik:RadTreeNode>
                    </Nodes>
     
            </telerik:RadTreeView>
        </div>
        </form>
    </body>
    </html>


    As you can see, I used one of the simple samples and only added the events I was interested in to test them.
    Thanks
  2. Eric Carlson
    Eric Carlson avatar
    12 posts
    Member since:
    Nov 2005

    Posted 13 Oct 2011 Link to this post

    This was resolved.  I was using an event and event handler from an obsolete demo.  Updating to the current demo solved the problem.
    http://www.telerik.com/help/aspnet-ajax/treeview-client-objects-radtreenode.html
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top