ServerSideCallBack and htmlencoding problem

2 posts, 0 answers
  1. Caesar
    Caesar avatar
    59 posts
    Member since:
    Aug 2008

    Posted 15 Jun 2011 Link to this post

    Hi,

    When using the treeview with ExpandMode=ServerSideCallBack, the nodes doesn't htmlencode correctly after updatepanel has updated.
    Sample:
    TestTree.aspx
    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestTree.aspx.vb" Inherits="WebApplication4.TestTree" %>
     
    <!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>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <telerik:RadScriptManager ID="rsm" runat="server">
            </telerik:RadScriptManager>
            <asp:UpdatePanel ID="up" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
                <ContentTemplate>
                    <telerik:RadTreeView ID="tv" runat="server">
                        <Nodes>
                            <telerik:RadTreeNode runat="server" id="tn" Text="test" ExpandMode="ServerSideCallBack">
                            </telerik:RadTreeNode>
                        </Nodes>
                    </telerik:RadTreeView>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        </form>
    </body>
    </html>

    TestTree.aspx.vb
    Public Class TestTree
        Inherits System.Web.UI.Page
     
        Private Sub tv_NodeClick(sender As Object, e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles tv.NodeClick
            'Do something
        End Sub
     
        Private Sub tv_NodeExpand(sender As Object, e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles tv.NodeExpand
            e.Node.Nodes.Add(New Telerik.Web.UI.RadTreeNode(HttpUtility.HtmlEncode("<aaa>")))
        End Sub
     
    End Class

    To reproduce:
    1. Expand the test-node with the plus-image
    2. Select the test-node (will cause a postback of the updatepanel)
    3. The sub-node "<aaa>" seems to disappear (but in fact it has just not been htmlencoded anymore)

    This works if using ExpandMode=ServerSide.

    Regards
    Caesar
  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 15 Jun 2011 Link to this post

    Hello,

    Thank you for reporting the problem to our team. Your telerik points are updated.

    I have logged it and as soon there is a movement on this we will notify you in this same thread.


    Regards,
    Nikolay Tsenkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top