This is a migrated thread and some comments may be shown as answers.

[Solved] Bug? - GridHtmlEditorColumn inside RadAjaxPanel or Updated via Ajaxmanager

4 Answers 195 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 12 Aug 2008, 08:24 PM
I'm updating an objectdatasource.  When the grid containing the htmleditorcolumn is outside the ajax panel it works fine.  When the grid is inside the radajaxpanel the htmleditorcolumn is the only column that will not update the datasource.  I am using version 2008.2 723. 

After further testing, it appears to always work in IE but it behaves as described above in Firefox and Safari.

Thanks,

Mike

4 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 15 Aug 2008, 10:41 AM
Hello Mike,

Based on the supplied information, it is hard to determine the cause of the issue. In order to further investigate it, please open a formal support ticket, and send us the problematic code. We will review it locally, and get back to you with our findings.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dai
Top achievements
Rank 1
answered on 25 Mar 2009, 01:30 PM
i got the same error with Mike
I use FF and find The GridHTMLEditorColumn can not update when using RadAjaxPanel Or Update Via AjaxManager
But when starting using IE, no probs
This is my ascx file
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="View_PostPicture.ascx.cs" Inherits="hqdai.Modules.EO_Pictures.View_PostPicture" %> 
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
    Namespace="System.Web.UI" TagPrefix="asp" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
    <link rel="stylesheet" href='<%= FileLocation()%>/css/Shadow.css' media="screen" type="text/css"/> 
</telerik:RadCodeBlock> 
<style type="text/css"
.modalBackground { 
    background-color:Gray; 
</style> 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGridPic"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGridPic" LoadingPanelID="RadAjaxLoadingPanel1"/> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="20"
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" /> 
</telerik:RadAjaxLoadingPanel> 
         
<telerik:RadGrid Width="97%" ID="RadGridPic" runat="server" Skin="Default" 
    OnNeedDataSource="RadGridPic_NeedDataSource" AllowAutomaticUpdates="True" OnUpdateCommand="RadGridPic_UpdateCommand" GridLines="None" OnItemDataBound="RadGridPic_ItemDataBound"
    <PagerStyle Mode="NextPrevAndNumeric" /> 
    <MasterTableView AutoGenerateColumns="False" Width="100%" DataKeyNames="PicID"
        <Columns> 
            <telerik:GridTemplateColumn HeaderText="T&#225;c phẩm" UniqueName="TemplateColumn"
                <ItemTemplate> 
                    <div class="img-shadow"
                        <img src='<%# getPicture(DataBinder.Eval(Container.DataItem, "Picture").ToString())%>' height="100px" /> 
                    </div> 
                </ItemTemplate> 
                <ItemStyle HorizontalAlign="Center" /> 
                <HeaderStyle Font-Bold="True" Font-Names="Tahoma" Font-Size="11px" HorizontalAlign="Center" /> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn UniqueName="PicID" Visible="False"
                <ItemTemplate> 
                    <asp:Label ID="lblPicID" runat="server" Text='<%# Eval("PicID")%>'></asp:Label> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn UniqueName="Title" DataField="Title" HeaderText="T&#234;n t&#225;c phẩm" > 
                <HeaderStyle Font-Bold="True" Font-Names="Tahoma" Font-Size="11px" HorizontalAlign="Center" /> 
                <ItemStyle HorizontalAlign="Center" CssClass="DNormalBold" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridHTMLEditorColumn UniqueName="Description" DataField="Description" HeaderText="Diá»…n giải"
                <HeaderStyle Font-Bold="True" Font-Names="Tahoma" Font-Size="11px" HorizontalAlign="Center" /> 
                <ItemStyle CssClass="DNormal" /> 
            </telerik:GridHTMLEditorColumn> 
            <telerik:GridEditCommandColumn ButtonType="ImageButton"/> 
        </Columns> 
        <EditFormSettings> 
            <EditColumn ButtonType="ImageButton"/> 
        </EditFormSettings> 
    </MasterTableView> 
</telerik:RadGrid> 
 
         

This is my cs file
using System; 
using System.Configuration; 
using System.Data.SqlClient; 
using System.Data; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using DotNetNuke.Common; 
using DotNetNuke.Common.Utilities; 
using DotNetNuke.Entities.Modules; 
using DotNetNuke.Entities.Modules.Actions; 
using DotNetNuke.Services.Exceptions; 
using DotNetNuke.Services.Localization; 
using Telerik.Web.UI; 
 
using hqdai.EO_Pictures.Components; 
 
namespace hqdai.Modules.EO_Pictures 
    public partial class View_PostPicture : PortalModuleBase, IActionable 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            if (DotNetNuke.Framework.AJAX.IsInstalled()) 
            { 
                DotNetNuke.Framework.AJAX.RegisterScriptManager(); 
            } 
 
            if (!IsPostBack) 
            { 
                 
            } 
        } 
        #region IActionable Members 
 
        public DotNetNuke.Entities.Modules.Actions.ModuleActionCollection ModuleActions 
        { 
            get 
            { 
                //create a new action to add an item, this will be added to the controls 
                //dropdown menu 
                ModuleActionCollection actions = new ModuleActionCollection(); 
                actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.AddContent, this.LocalResourceFile), 
                    ModuleActionType.AddContent, """", EditUrl(), false, DotNetNuke.Security.SecurityAccessLevel.Edit, 
                     truefalse); 
                return actions; 
            } 
        } 
        #endregion 
 
        protected void RadGridPic_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
        { 
            RadGridPic.DataSource = DataProvider.Instance().GetEO_PicturesByUserID(UserId); 
        } 
 
        protected void RadGridPic_UpdateCommand(object source, GridCommandEventArgs e) 
        { 
            EO_PicturesController objCtrl = new EO_PicturesController(); 
            EO_PicturesInfo objInfo = new EO_PicturesInfo(); 
 
            //Get Datakey value 
            int PicID = int.Parse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["PicID"].ToString()); 
 
            //Get Pic Object 
            objInfo = objCtrl.Get(PicID); 
 
            GridEditableItem edititem = (GridEditableItem)e.Item; 
 
            //Write new data 
            TextBox txtTitle = (TextBox)edititem["Title"].Controls[0]; 
            RadEditor edtDesc = (RadEditor)edititem["Description"].Controls[0]; 
            objInfo.Title = txtTitle.Text; 
            objInfo.Description = edtDesc.Content; 
            objCtrl.Update(objInfo); 
            //close Edit mode 
            e.Item.Edit = false
        } 
 
        public string getPicture(string pic) 
        { 
            return Globals.ResolveUrl("~/Portals/" + PortalId + "/EO_Pictures/" + pic); 
        } 
 
        protected void RadGridPic_ItemDataBound(object sender, GridItemEventArgs e) 
        { 
            EO_PicturesController objCtrl = new EO_PicturesController(); 
            EO_PicturesInfo objInfo = new EO_PicturesInfo(); 
 
            if (e.Item is GridDataItem) 
            { 
                GridDataItem item = (GridDataItem)e.Item; 
                Label lblPicID = (Label)item["PicID"].FindControl("lblPicID"); 
                int PicID = int.Parse(lblPicID.Text.ToString()); 
                objInfo = objCtrl.Get(PicID); 
 
                if (Null.IsNull(objInfo.Title) || Null.IsNull(objInfo.Description)) 
                { 
                    e.Item.Attributes["style"] = "background-color:#ffe0e0"
                } 
                else 
                { 
                    if (objInfo.IsApproved != 0) 
                    { 
                        e.Item.Attributes["style"] = "background-color:#dfffd7"
                        e.Item.Edit = false
                    } 
                } 
            } 
        } 
        public string FileLocation() 
        { 
            return Globals.ResolveUrl("~/DesktopModules/EO_Pictures/"); 
        } 
    } 

i'm using DNN 492

Could you show me any sugestion?

0
Nick
Top achievements
Rank 1
answered on 26 Oct 2009, 03:02 PM
I have the same problem.
Things work fine in IE and Chrome, but not in Fx.
Is there already a solution available ?
Kind regards,
Nick
0
Mike
Top achievements
Rank 1
answered on 26 Oct 2009, 03:35 PM
I think I gave up on the htmleditorcolumn.  I use a gridtemplatecolumn with a radeditor in the edititemtemplate.  Just bind the data to the content property.  It seems to work in all browsers.  Good luck.

Mike
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Dai
Top achievements
Rank 1
Nick
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Share this question
or