RadAsyncUpload bug: Loses skin when combined with RadAjax

4 posts, 0 answers
  1. Andrew
    Andrew avatar
    24 posts
    Member since:
    Nov 2006

    Posted 17 Dec 2010 Link to this post

    The following code demonstrates the problem:

    On the ASPX page:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestForm.aspx.cs" Inherits="TestForm" %>
     
    <!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>
        <asp:ScriptManager runat="server" ID="sm" />
        <telerik:RadAjaxManager runat="server" ID="ram">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="chkBox">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnlAjaxHandle" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
     
        <asp:CheckBox runat="server" ID="chkBox" Text="Show" AutoPostBack="true" />
     
        <asp:Panel runat="server" ID="pnlAjaxHandle">
            <telerik:RadAsyncUpload runat="server" ID="upload" />
        </asp:Panel>
     
        <asp:Button runat="server" ID="button" Text="Submit" />
        </div>
        </form>
    </body>
    </html>

    In the code behind:
    public partial class TestForm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            upload.Visible = chkBox.Checked;
        }
    }


    To replicate the bug:

    1) Check the checkbox - Uploader becomes visible
    2) Uncheck the checkbox - Uploader is hidden
    3) Click Submit button
    4) Check the checkbox - Uploader becomes visible and has lost its skin

    Also, a whole lot of javascript errors are thrown. They look something like this:
    Error: Sys.ArgumentOutOfRangeException: Value must be an integer.
    Parameter name: y
    Actual value was 54.5.
    Source File: http://localhost:3283/ScriptResource.axd?d=8jczEaLTFUBNqwheNCryHqfGUyK2jzpjLXo5mShpcz0vUHsdNGX-REGSwtvamEPDvjtp5sE7pj8aTVKzLe84Q85zDxCG4QATzYj_HpM0Cnan9nZUFERr90xkeQfhl5f6aXCNKC5ZmIzMAPOOyOmuWJBKQo-2AyNSw9-R7L0L6qZXIrJo0&t=2610f696
    Line: 4488


    Using Telerik version 2010.1.519.35.
  2. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 20 Dec 2010 Link to this post

    Hello Andrew,

    Please add the following code to fix the skin issue:

    protected void chkBox_CheckedChanged(object sender, EventArgs e)
        {
            upload.EnableAjaxSkinRendering = true;
        }

    Regards,
    Helen
    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.
  3. Andrew
    Andrew avatar
    24 posts
    Member since:
    Nov 2006

    Posted 22 Dec 2010 Link to this post

    Hi,
    Thanks, that appears to have alleviated the problem, however the control is still losing its skin on one of my pages. The problem occurs only in IE (including IE8), not Firefox or Chrome. Unfortunately I haven't been able to create a test page to replicate the problem.

    The page is quite heavy, with a lot of javascript running - perhaps it is timing issue with IE?
  4. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1600 posts

    Posted 24 Dec 2010 Link to this post

    Hello Andrew,

    This is due to the infamous 31 stylesheets per page bug in IE. I suggest that you read the following blog post for additional information.

    Kind regards,
    Genady Sergeev
    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