Image Editor throwing Javascript error when used in a Rad Grid in side an Ajax panel.

2 posts, 0 answers
  1. Ankit
    Ankit avatar
    12 posts
    Member since:
    Jul 2011

    Posted 17 Nov 2011 Link to this post

    I have a Rad Grid placed inside an Ajax Panel. And I have placed an Image Editor control in the nestedViewTemplate. My grid is suppose to load asynchronously so I have a button on click of the button the grid is suppose to load. When I place the Image Editor control the grid fails to load with a Javascript error. If I remove the Image Editor control it works fine. Please find the code snippet. below is the aspx.cs code.

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <head runat="server">
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <%--Needed for JavaScript IntelliSense in VS2010--%>
                <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        <script type="text/javascript">
            //Put your JavaScript code here.
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="100%" Width="100%"
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
                <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0"
                        <CommandItemSettings ExportToPdfText="Export to PDF" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            <HeaderStyle Width="20px" />
                                        <telerik:RadImageEditor ImageUrl="Sunset.jpg" ID="RadImageFront" runat="server" Width="100px"
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            <HeaderStyle Width="20px" />
                            <telerik:GridBoundColumn DataField="Id" FilterControlAltText="Filter column column"
                                HeaderText="Id" UniqueName="column">
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    <FilterMenu EnableImageSprites="False">
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">

    Below is the code behind code.
    public partial class Default : System.Web.UI.Page
        protected void Button1_Click(object sender, EventArgs e)
            DataTable dt = new DataTable("test");
            dt.Columns.Add(new DataColumn("Id"));
            DataRow dr;
            dr = dt.NewRow();
            dr[0] = 5;
            RadGrid1.DataSource = dt;
     Would appreciate any help....
  2. Niko
    Niko avatar
    404 posts

    Posted 21 Nov 2011 Link to this post

    Hi Ankit,

    Unfortunately I wasn't able to reproduce the issue that you are experiencing, using the setup that you have provided. Could it be that you are using an older version of the controls? There was a similar issue with the first release of the ImageEditor control - Q2.2011, but this has been resolved since.

    The best option would be to open a support ticket and attach a stripped-down sample runnable project that reproduces the issue.

    Hope this helps.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top