Hello,
I am having a problem with a RadEditor thats in the EditTemplate of a RadGrid that is using the Batch edit mode. All HTML tags are lost after the row loses focus.
Steps to reproduce the issue on the sample below:
1. Click one of the rows to enter edit mode
2. Add a hyperlink using the richtexteditor or make a text bold. Anything that adds one or more HTML tags.
3. Exit edit mode, by clicking a different row.
4. All HTML tags are now lost.
See the code sample below:
Markup:
Code behind:
I am having a problem with a RadEditor thats in the EditTemplate of a RadGrid that is using the Batch edit mode. All HTML tags are lost after the row loses focus.
Steps to reproduce the issue on the sample below:
1. Click one of the rows to enter edit mode
2. Add a hyperlink using the richtexteditor or make a text bold. Anything that adds one or more HTML tags.
3. Exit edit mode, by clicking a different row.
4. All HTML tags are now lost.
See the code sample below:
Markup:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestCase.aspx.cs" Inherits="Test.TestCase" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager runat="server" /> <telerik:RadGrid ID="gvFactors" runat="server" AutoGenerateColumns="false" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" Skin="Metro" OnNeedDataSource="gvFactors_OnNeedDataSource"> <MasterTableView TableLayout="Auto" EditMode="Batch" CommandItemDisplay="Top"> <Columns> <telerik:GridTemplateColumn UniqueName="Text" DataField="Text" ColumnEditorID="tbText"> <ItemTemplate> <%# Eval("Text") %> </ItemTemplate> <EditItemTemplate> <telerik:RadEditor ID="tbText" runat="server" Skin="Metro" Content='<%#Eval("Text")%>' MaxHtmlLength="4000" EditModes="Design"/> </EditItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid> </div> </form></body></html>Code behind:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace Test { public partial class TestCase : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void gvFactors_OnNeedDataSource(object sender, EventArgs e) { IList<DataItem> items = new List<DataItem>(); items.Add(new DataItem() { Text = "test1" }); items.Add(new DataItem() { Text = "test2" }); items.Add(new DataItem() { Text = "test3" }); this.gvFactors.DataSource = items; } } public class DataItem { public String Text { get; set; } }}