<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default2.aspx.cs" Inherits="NLGOnLineTestClient.default2" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="True" oninit="RadCalendar1_Init"> </telerik:RadCalendar> </div> </form></body></html>using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace NLGOnLineTestClient{ public partial class default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void RadCalendar1_Init(object sender, EventArgs e) { string range = string.Format("Start: {0} End {1}", RadCalendar1.CalendarView.ViewStartDate.ToString("g"), RadCalendar1.CalendarView.ViewEndDate.ToString("g")); System.Diagnostics.Debug.WriteLine(range); } }}<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None" AutoGenerateEditColumn="True" AllowMultiRowEdit="True" Width="40%" OnPreRender="RadGrid1_PreRender" AllowAutomaticUpdates="True" OnItemCommand="RadGrid1_ItemCommand" ><MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" EditMode="InPlace" CommandItemDisplay="Top"> <CommandItemTemplate> <asp:LinkButton ID="btnUpdate" runat="server" CommandName="Update" Visible='true' Text="Update" Font-Bold="True" Font-Size="Larger" /> </CommandItemTemplate><RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Name" SortExpression="Name" UniqueName="Name"> </telerik:GridBoundColumn> <telerik:GridCheckBoxColumn DataField="IsParent" DataType="System.Boolean" FilterControlAltText="Filter IsParent column" HeaderText="IsParent" SortExpression="IsParent" UniqueName="IsParent"> </telerik:GridCheckBoxColumn> </Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings><PagerStyle PageSizeControlType="RadComboBox"></PagerStyle></MasterTableView><PagerStyle PageSizeControlType="RadComboBox"></PagerStyle><FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MachineSalesConnectionString1 %>" SelectCommand="SELECT [ID], [Name], [IsParent] FROM [Manufacturer]" UpdateCommand="UPDATE [Manufacturer] SET [Name] = @Name, [IsParent] = @IsParent WHERE [ID] = @ID"> <DeleteParameters> <asp:Parameter Name="ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="IsParent" Type="Boolean" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="IsParent" Type="Boolean" /> <asp:Parameter Name="ID" Type="Int32" /> </UpdateParameters> </asp:SqlDataSource>using System;using Telerik.Web.UI;public partial class Default2 : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } protected void RadGrid1_PreRender(object sender, System.EventArgs e) { if (!IsPostBack) { foreach (GridItem item in RadGrid1.MasterTableView.Items) { if (item is GridEditableItem) { GridEditableItem editableItem = item as GridDataItem; editableItem.Edit = true; } } RadGrid1.Rebind(); } } protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) { // if (e.CommandName == "UpdateAll") // { // foreach (GridEditableItem editedItem in RadGrid1.EditItems) // { // Hashtable newnewValues = new Hashtable(); // //The GridTableView will fill the values from all editable columns in the hash // e.Item.OwnerTableView.ExtractValuesFromItem(newnewValues, editedItem); // SqlDataSource1.UpdateCommand = String.Format("Update Manufacturers SET IsParent={0} WHERE ID={1}", newnewValues["IsParent"], editedItem["ID"].Text); // SqlDataSource1.Update(); // editedItem.Edit = false; // } // } // RadGrid1.Rebind(); } }Several of the formatting functions like alignment, numbering, tabbing, font style or size, spell check, etc. do not work intermittently.
Once radEditor is opened and I type in the following:
This is the Request Search screen.
You can search for requests in this screen
Now I put my cursor after the third bullet item and pressed enter twice for a new line. Then I typed in a couple of words, highlighted them with my mouse and clicked the icon to center the text. Nothing happened but if I click a different tab on my asp page, click radEditor again, highlight the text and click the icon to center the text it works.
This behavior is mostly noticed on pages that also have Telerik Treeview navigation on them. Is there a known conflict between Telerik Treeview and RadEditor?
Also this issue cannot be replicated when I run locally on my machine but can be seen on our Development and UAT server.
Another issue we noticed is that when RadEditor window is moved around, you can see the Treeview navigation through it.
I have attached the screenshots.
Here are code snippets:
Site.master:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="Wf.Sparc.Web.SiteMasterPage" %>
<%@ Register TagPrefix="ajaxToolkit" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<td valign="middle" class="rightblock">
<asp:LinkButton ID="HelpPageView" runat="server" Text="View Help |" Font-Underline="true"
toolTip="View information related to this page" ></asp:LinkButton>
<asp:Panel ID="ModalPanelView" runat="server" style="display:none; width:380px; height:330px; background-color:White;
border-width:2px; border-color:Black; border-style:solid; padding:20px;" >
<asp:Button ID="OKButton" runat="server" Text="Close" ForeColor="Black" /> <br /><br />
<telerik:RadEditor ID="radBodyView" ToolbarMode="Default" ToolsFile="~/RadControls/ToolsFile.xml" runat="server"
ContentFilters="RemoveScripts" EditModes="All" Height="250" SkinID="RadEditorSkin" Enabled="false"
BackColor="LightGray" Width="380" EnableResize="true" style="text-align: left; overflow:auto " />
<script type="text/javascript">
//This script must be below the RadEditor declaration
//It displays the custom toolbar icon formatting FAQ
//It replaces embedded scripts from a previous version of Telerik RadEditor
Telerik.Web.UI.Editor.CommandList["FormattingFAQ"] = function (commandName, editor, args) {
var args = editor.get_html(true) //returns the HTML of the selection.
editor.showExternalDialog("/RadControls/FormattingFAQ.aspx", args, 500, 470, null, null, "Formatting FAQ",
true, Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, true, true); };
Telerik.Web.UI.RadEditor.prototype._markExistingEmptyParagraphs = function (content) {
return content;
}
Telerik.Web.UI.RadEditor.prototype._fixBrokenParagraphs = function (content) {
return content;
}
</script>
<br /><br />
</asp:Panel>
<ajaxToolkit:ModalPopupExtender ID="modalView" runat="server" TargetControlId="HelpPageView" PopupControlID="ModalPanelView"
OkControlID="OKButton" />
<asp:LinkButton ID="HelpPageEdit" runat="server" Text=" Edit Help |" Font-Underline="true"
toolTip="Edit information related to this page" ></asp:LinkButton>
<asp:Panel ID="ModalPanelEdit" runat="server" style="display:none; width:480px; height:330px; background-color:White;
border-width:2px; border-color:Black; border-style:solid; padding:20px;" Enabled="true">
<asp:Button ID="ButtonEdit" runat="server" Text="Close" ForeColor="Black" /> <br /><br />
<telerik:RadEditor ID="radBodyEdit" ToolbarMode="Default" ToolsFile="~/RadControls/ToolsFile.xml" runat="server" Enabled="true"
ContentFilters="RemoveScripts" EditModes="All" Height="250" SkinID="RadEditorSkin" Width="100" EnableResize="true" />
<script type="text/javascript">
//This script must be below the RadEditor declaration
//It displays the custom toolbar icon formatting FAQ
//It replaces embedded scripts from a previous version of Telerik RadEditor
Telerik.Web.UI.Editor.CommandList["FormattingFAQ"] = function (commandName, editor, args) {
var args = editor.get_html(true) //returns the HTML of the selection.
editor.showExternalDialog("/RadControls/FormattingFAQ.aspx", args, 500, 470, null, null, "Formatting FAQ",
true, Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, true, true); };
Telerik.Web.UI.RadEditor.prototype._markExistingEmptyParagraphs = function (content) {
return content;
}
Telerik.Web.UI.RadEditor.prototype._fixBrokenParagraphs = function (content) {
return content;
}
</script>
<br /><br />
<asp:Button ID="SaveButtonEdit" runat="server" Text="Save" ForeColor="Black" OnClick="saveHelpContent"/>
<asp:Button ID="CancelButtonEdit" runat="server" Text="Cancel" ForeColor="Black" /> <br /><br /> <br /><br />
</asp:Panel>
<ajaxToolkit:ModalPopupExtender ID="PopupEdit" runat="server" TargetControlId="HelpPageEdit" PopupControlID="ModalPanelEdit"
CancelControlID="CancelButtonEdit" OkControlID="ButtonEdit" PopupDragHandleControlID="ModalPanelEdit"/>
-----------------------------------------------------------------------------
site.master.cs
protected void saveHelpContent(object sender, EventArgs e)
{
string pagePath = System.Web.HttpContext.Current.Request.Path.ToString();
bool pagePathfound = DbAccess.SparcHelpPathCheck(pagePath);
if (pagePathfound == false)
{
Wf.Sparc.DAL.DbAccess.UpdSparcHelpContent("ins", pagePath, radBodyEdit.Content, int.Parse(Session["userid"].ToString()));
HelpPageView.Visible = true;
radBodyView.Content = radBodyEdit.Content;
}
else
{
Wf.Sparc.DAL.DbAccess.UpdSparcHelpContent("upd", pagePath, radBodyEdit.Content, int.Parse(Session["userid"].ToString()));
radBodyView.Content = radBodyEdit.Content;
}
}
protected string GetRadEditorContent()
{
string pagePath = System.Web.HttpContext.Current.Request.Path.ToString();
string RadContent = DbAccess.GetSparcHelpContent(pagePath).ToString();
return RadContent;
}
protected void Page_Load(object sender, EventArgs e)
{
//For View/Edit help link
string pagePath = System.Web.HttpContext.Current.Request.Path.ToString();
bool pagePathfound = DbAccess.SparcHelpPathCheck(pagePath);
if (!IsPostBack)
{
radBodyView.Content = GetRadEditorContent();
radBodyEdit.Content = GetRadEditorContent();
}
if (isHelpAdmin)
{
if (pagePathfound == false)
{
HelpPageEdit.Visible = true;
HelpPageView.Visible = false;
}
else
{
if ((radBodyEdit.Content == "") || (radBodyEdit.Content == "<P> </P>"))
{
HelpPageEdit.Visible = true;
HelpPageView.Visible = false;
}
else
{
HelpPageEdit.Visible = true;
HelpPageView.Visible = true;
}
}
}
else
{
if (pagePathfound == false)
{
HelpPageEdit.Visible = false;
HelpPageView.Visible = false;
}
else
{
if ((radBodyEdit.Content == "") || (radBodyEdit.Content == "<P> </P>"))
{
HelpPageEdit.Visible = false;
HelpPageView.Visible = false;
}
else
{
HelpPageEdit.Visible = false;
HelpPageView.Visible = true;
}
}
}
}
function Test_OnCellSelected(sender, args) { var gridDataItem = args.get_gridDataItem(); var cell = gridDataItem.get_cell();}var maskedTextBox = document.getElementById('<%=uxPhoneNumber.FindControl("uxAreaCode").ClientID %>');
if (maskedTextBox != null) {
maskedTextBox.set_value("");
} 