当使用asp.net时,日期选择器正在从我的radeditor框中删除数据

时间:2014-05-28 23:03:44

标签: asp.net telerik

我的asp.net页面中有6个文本框,以前工作正常。它们现在已被改为telerik RadEditor盒子。当你向下滚动页面并使用telerik datepicker选择一个日期字段时,6 telerik RadEditor框中的所有信息都会消失。

Helppppppp .....

当它们是普通的文本框时,它曾经很好地工作。

        tbxRiskDesc.Attributes.Add("onchange", "setDirty();");

现在它们是RadEditor框,setDirty()函数似乎不起作用。

        RadEditorRiskDesc.Attributes.Add("onchange", "setDirty();");

aspx代码如下:

                <td class="fieldLabel" >
                    <asp:label id="lblRiskDesc" runat="server">Risk Description or Improvement Opportunities</asp:label>
                    <a href="javascript:help_create('Risk_Description')"> <img alt="" src="images/question_mark_icon.gif" border="0" /> </a>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
                    <asp:RequiredFieldValidator ID="vldRiskDesc" runat="server" ControlToValidate="RadEditorRiskDesc" ValidationGroup="Risk" 
                        ErrorMessage="Risk Description must be entered" Font-Bold="True" Display="Dynamic" EnableClientScript="False">
                        Risk description must be entered</asp:RequiredFieldValidator>
                </td>
                <td>
                    <telerik:radeditor runat="server" ID="RadEditorRiskDesc" Height="200px" SkinID="MinimalSetOfTools" ToolsFile="~/RadControls/Editor/ToolsFile.xml" EditModes="Design" SpellCheckSettings-DictionaryPath="~/RadControls/Spell/TDF/">
                    </telerik:radeditor>                        
                </td>

aspx.cs代码如下:

Page_Load
        //tbxRiskDesc.Attributes.Add("onchange", "setDirty();");
        RadEditorRiskDesc.Attributes.Add("onchange", "setDirty();");

ResetData
            //SetTextCurrentValue(tbxRiskDesc, dtEditTable, "RiskDesc");
            RadEditorRiskDesc.Content = dtEditTable.Rows[0]["RiskDesc"].ToString();

ClearData
        //SetTextValue(tbxRiskDesc, "RISK TITLE & DESC.:");
        RadEditorRiskDesc.Content = "RISK TITLE & DESC.:";

SaveData
       string[] newvalue = new string[]
           {ddlSource.SelectedItem.Value,
            ddlQualityStd.SelectedItem.Value,
            tbxLocationID.Text,
            ddlRiskCategory.SelectedItem.Value.ToString(),
            bscobjective_id,
            RadEditorRiskDesc.Content,
            //tbxRiskDesc.Text,......

       DAL.UpdateEditHistory(
              historyID,
              EditDate.ToString(),
              ddlSource.SelectedItem.Value,
              ddlQualityStd.SelectedItem.Value,
              tbxLocationID.Text,
              ddlRiskCategory.SelectedItem.Value,
              bscobjective_id,
              RadEditorRiskDesc.Content.Replace("'", string.Empty).Replace(",", string.Empty).Replace(quote, string.Empty), 
              //tbxRiskDesc.Text.Replace("'", string.Empty).Replace(",", string.Empty).Replace(quote, string.Empty),......

1 个答案:

答案 0 :(得分:0)

似乎您需要知道编辑器的内容何时发生变化。这应该通过向内容区域添加所需的处理程序来完成,如下所示:http://www.telerik.com/help/aspnet-ajax/editor-attacheventhandler.html。我想keyup事件对你有用。