Hi Team,
Below sample code I am using, now when I run the application, I have entered some text and make it as "Bold" (select from toolbar) and click enter and write some more sentence, now, what ever I wrote those sentence I am seeing with dotted lines (see the attached image).
Note# "EditMode="Design" please help me asap.
FYI, to replicate this issue use below sample code and, follow below steps.
when "EditMode="Design" first enter some sample text then make it bold that text -->click on enter-->enter some more text you will able to see dotted lines.
Goto "Preview" mode, you can able to see all the sentence which you entered in "Design" mode.
If I remove "ContentAreaMode="Div" " property, it's working fine but I need this property.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ 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>
<script type="text/javascript">
function RadEditorOnLoad(editor, args) {
//debugger;
var htmlArea = editor.get_textArea();
var contentArea = editor.get_contentArea();
var editorId = editor._element.id;
if (htmlArea) {
htmlArea.attachEvent('onchange', function () { MyCharacterCounter(editor, ''); });
htmlArea.attachEvent('onkeyup', function () { MyCharacterCounter(editor, ''); });
htmlArea.attachEvent('onkeypress', function () { MyCharacterCounter(editor, ''); });
}
if (contentArea) {
contentArea.attachEvent('onchange', function () { MyCharacterCounter(editor, ''); });
contentArea.attachEvent('onkeyup', function () { MyCharacterCounter(editor, ''); });
contentArea.attachEvent('onkeypress', function () { MyCharacterCounter(editor, ''); });
}
}
function MyCharacterCounter(editor, ExpLen) {
var comments = editor._contentArea.innerText;
var counterlabel = editor._element.parentElement.children[2];
if (document.getElementById(ExpLen)) {
var maxlength = document.getElementById(ExpLen).value;
}
else {
var maxlength = document.getElementById('hdnExplanationLength').value;
}
if (comments.length == parseInt(maxlength)) {
counterlabel.innerHTML = "0 Text Limit has been reached";
}
else if (comments.length > parseInt(maxlength)) {
counterlabel.innerHTML = (parseInt(maxlength) - comments.length) + " Text Limit has been exceeded, Please reduce the text";
}
else {
counterlabel.innerHTML = (parseInt(maxlength) - comments.length);
}
if (comments.length > parseInt(maxlength)) {
counterlabel.style.color = 'red'
}
else {
counterlabel.style.color = 'grey'
}
}
</script>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<div>
<table width="100%">
<tr width="100%">
<td width="100%">
<asp:HiddenField ID="hdnExplanationLength" runat="server" Value="2000" />
<telerik:RadEditor ID="txt_GeneralExplanationAdd" BorderStyle="None" runat="server"
Width="50%" ToolsFile="ToolsFile.xml" Height="200px" Font-Names="Tahoma" Font-Size="11px"
Style="margin-bottom: 5px;" EnableResize="False" ContentAreaMode="Div" StripFormattingOptions="MSWordRemoveAll,ConvertWordLists"
StripFormattingOnPaste="None" NewLineMode="Br" NewLineBr="true" OnClientLoad="RadEditorOnLoad">
</telerik:RadEditor>
<asp:Label ID="lbl_PrescriberExpTextCounter" runat="server" Text='2000' Style="color: Gray;
float: right; margin-bottom: 5px;"></asp:Label>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
ToolsFile.XML
<root>
<tools>
<tool name="Bold" strip="FontBasicTools" shortcut="CTRL+B"/>
<tool name="Italic" strip="FontBasicTools" shortcut="CTRL+I"/>
<tool name="Underline" strip="FontBasicTools" shortcut="CTRL+U"/>
<tool name="ForeColor"/>
<tool name="BackColor"/>
</tools>
<tools>
<tool name="InsertUnorderedList" strip="ListsAndIndention"/>
<tool name="InsertOrderedList" strip="ListsAndIndention"/>
<tool name="JustifyLeft" strip="Align"/>
<tool name="JustifyCenter" strip="Align"/>
<tool name="JustifyRight" strip="Align"/>
<tool name="JustifyFull" strip="Align"/>
</tools>
</root>
Hi, I'm trying to make a grid using RadGrid ASP.Net and Visual Studio 2015 but I can't make RadGrid to show checkbox inside a column.
This is the code:
<
telerik:GridClientSelectColumn
UniqueName
=
"Select"
HeaderStyle-Width
=
"30px"
HeaderStyle-HorizontalAlign
=
"Left"
ItemStyle-HorizontalAlign
=
"Left"
>
</
telerik:GridClientSelectColumn
>
Any help will be appreciated.
We have a site hosted by an outside company; now we want to bring it back to in-house after contract expires. I got the code. I can compiled without any problem; then got the error when launching the site,
Could not load file or assembly 'Telerik.Framework, Version=3.7.2136.240, Culture=neutral, PublicKeyToken=dfeaee0e3978ac79' or one of its dependencies. The system cannot find the file specified
In the web.config, the following lines caused the error.
Line 264: <add verb="GET" path="*.sflb" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine" />
Line 265: <add verb="GET" path="*.sflb.ashx" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine" />
Line 266: <add verb="GET" path="*.tmb" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine" />
The project has the following Telerik references,
Telerik.Cms.Data.dll
Telerik.Cms.dll
Telerik.Cms.Engine.Data.dll
Telerik.Cms.Engine.dll
Telerik.Cms.Web.UI.dll
The contract company said they received the code from old developers and made it working only using the available Telerik dll files. Can any expert tell me what causes the error and if the Telerik.framework.dll or any other Telerik dll is needed? I suspect the dll is in GAC if needed.
thanks
How do I cancel the enter key inside radeditor?
I found other examples from telerik support suggesting to use cancelRawEvent. This function does not work to prevent enter key, although it seems to block other keys just fine. I have tried all sorts of combinations of preventDefault, stopPropagation, set_cancel, return false, etc. Nothing stops it from inserting a carriage return into the radeditor. Is it just not possible?
function EditorLoad(editor, args) {
editor.attachEventHandler("onkeydown", function(e)
{
if (e.keyCode == 13) {
$telerik.cancelRawEvent(e)
}
});
}
Hello Telerik team,
I am trying to achieve collapsing RadSlidingPane programmatically in java script or on server side but no luck.
Here what I am exactly trying to achieve:
I am having a search criteria with Search button in RadSlidingPane & I want to collapse all search criteria when user hits a Search button (which is also in the RadSlidingPane). Everything else working perfectly fine.
I wan to do this using java script or on server side so please let me know how to do this. Also please let me know if you need any additional information.
Thanks in advance.
Regards
Shirish
I have a RadGrid with several client event handlers enabled. If I include an OnRowDropping handler, it gets invoked before either of the other two event handlers (OnRowDblClick and OnRowContextMenu). If I remove the OnRowDropping handler the other two work correctly.
<
telerik:RadGrid
ID
=
"RadGridPapers"
runat
=
"server"
AutoGenerateColumns
=
"false"
ShowGroupPanel
=
"false"
OnItemDataBound
=
"RadGridPapers_ItemDataBound"
OnItemCommand
=
"RadGridPapers_ItemCommand"
OnRowDrop
=
"RadGridPapers_RowDrop"
>
<
clientsettings
AllowRowsDragDrop
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
EnableDragToSelectRows
=
"false"
/>
<
ClientEvents
OnRowDblClick
=
"rowDoubleClick"
OnRowContextMenu
=
"RowContextMenu"
OnRowDropping
=
"rowDropping"
/>
</
clientsettings
>
<
MasterTableView
Name
=
"MasterTablePapers"
DataKeyNames
=
"abstractID"
Caption
=
"Unscheduled Abstracts (double-click to schedule next, or drag to a timeslot above, or right-click to assign status)"
NoMasterRecordsText
=
"(No unscheduled Abstracts in this session.)"
AllowAutomaticInserts
=
"true"
AllowAutomaticUpdates
=
"true"
AllowAutomaticDeletes
=
"false"
AllowPaging
=
"false"
AllowSorting
=
"false"
AllowFilteringByColumn
=
"false"
EnableLinqGrouping
=
"false"
CommandItemDisplay
=
"None"
TableLayout
=
"Fixed"
Width
=
"100%"
>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldAlias
=
"Status"
FieldName
=
"dispositionName"
HeaderValueSeparator
=
": "
/>
</
SelectFields
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"dispositionID"
SortOrder
=
"Ascending"
/>
</
GroupByFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
My RadWindow works fine in IE11 and Firefox displaying in the center of the page. However, with Chrome, the window will display out of view displaying farther down the page. I know that this was working at some point fine. I am using version 2017.3.913.45
Does anyone know about a change in Chrome that could have caused this?
function ShowPricing(LineNumber) {
var oWnd = $find("<%=rwndPricing.ClientID%>");
oWnd.setUrl("Popups/GridPricing.aspx?<%=UserSession.SessionQueryVar %>&LineNumber=" + LineNumber);
oWnd.show();
return false;
}
<telerik:RadWindow ID="rwndPricing" runat="server" Behaviors="Close,Move,Resize"
AutoSize="true" Modal="true" VisibleStatusbar="false" ShowContentDuringLoad="false">
</telerik:RadWindow>
Previous company was doing websites and all websites use their license. Another company has the websites now and will be working on the them and recently purchased a Telerik license. How do they switch the license for the sites or do they need to?
ArgumentOutOfRangeException from Telerik.Web.UI.RadComboBox.PerformDataBinding()
My project using RadComboBox control throws exception below. The exception occurs intermittently and randomly. That is, it happens for the same user some times.
Exception below:
1) Exception Information
*********************************************
Exception Type: System.ArgumentOutOfRangeException
Message: Selection out of range
Parameter name: value
Data: System.Collections.ListDictionaryInternal
TargetSite: Void PerformDataBinding(System.Collections.IEnumerable)
HelpLink:
Source: Telerik.Web.UI
StackTrace Information
*********************************************
at Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource)
at Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e)
at Telerik.Web.UI.RadComboBox.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at Telerik.Web.UI.RadComboBox.DataBind()
at xxx.Default.Page_Load(Object sender, EventArgs e) in d:\xxx\Default.aspx.cs:line 34
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Assembly Information:
Assembly Telerik.Web.UI, Version=2014.3.1024.40, Culture=neutral, PublicKeyToken=121fae78165ba3d
Project Information:
ASP.NET, .NET 4.6
Telerik.Web.UI.RadComboBox Source code:
protected override void PerformDataBinding(IEnumerable dataSource)
{
base.PerformDataBinding(dataSource);
if (!string.IsNullOrEmpty(this.cachedSelectedValue))
{
RadComboBoxItem itemByValue = this.FindItemByValue(this.cachedSelectedValue);
if (itemByValue == null)
throw new ArgumentOutOfRangeException("value", "Selection out of range");
int num = this.Items.IndexOf(itemByValue);
if (this.cachedSelectedIndex != -1 && this.cachedSelectedIndex != num)
throw new ArgumentOutOfRangeException("value", "SelectedIndex and SelectedValue are mutually exclusive");
this.SelectedIndex = num;
this.cachedSelectedValue = (string) null;
this.cachedSelectedIndex = -1;
}
else if (this.cachedSelectedIndex != -1)
{
this.SelectedIndex = this.cachedSelectedIndex;
this.cachedSelectedIndex = -1;
}
this.UpdateFromCachedValueIndex();
}