Hi,
I
have a problem with the Radeditor and counting the length of the text inside
it. When I use a JavaScript with the get_text() function the length is different
from when I use Radeditor.Text.Length in code behind. I want both for client
and server side validation.
It seems like they count Enter key differently. Radeditor.Text.Length count them as two characters regardless how many I use. So one Enter key is two chars and five enter key is also two chars. It trims it down or something.
The JavaScript count every enter key as one characters unless it’s a line with no text between two lines with text, then it counts that enter key as two characters.
This is my code and everything is working fine it’s just that they are counting different when it comes to enter key.
//Validates the length against the maxlength allowed
_radEditorLengthCheck: function (sender, args) {
//Gets the maxLength property in my settings class
var maxLength = this.data.maxLength;
if (maxLength > 0) {
var editor = this.data.controls.get_editor();
var value = editor.get_text();
args.IsValid = value.length <= maxLength;
}
else {
args.IsValid = true;
}
},
//Updates a label counter so the user can se how many characters when blur
handle_blur: function (sender, args) {
var countlabel = this.data.objects.windowOriginalValue.data.controls.get_charCounter();
var editor = this.data.controls.get_editor();
var element = editor.get_contentArea();
$telerik.addExternalHandler(element, "blur", function (e) {
var value = editor.get_text();
countlabel.innerHTML = value.length;
});
}
//Client side validator
protected void EditorLengthValidator_ServerValidate(object source, ServerValidateEventArgs args)
{
// force Text-property to update
Radeditor.Content = Radeditor.Content;
string noHTML = Radeditor.Text;
args.IsValid = noHTML.Length <= MaxLength;
//Update the Label that shows the count
LCounterChars.InnerText = noHTML.Length.ToString();
}
Hi
We have recently updated our web project .net framework from 4.0 to 4.6.1. After the changes we noticed that 'radCalendar' popup displays strange characters for 'NextMonth/PrevMonth' controls. The tool-tip(title attribute) in those controls shows the same strange characters. Please see attached screenshot. Could you please advice how we could resolve this.
I am recently updated a web app to visual studio 2013.. When I check in Tools/Extensions and Updates I see Telerik ASP.NET AJAX vs Extentions version 2016.2.603.0.
When I view one of my web pages in the design view all of the RAD Controls have this error message:
EmployeeSectionError Creating Control - rcbAccusedFailed to create designer 'Telerik.Web.UI.RadComboBox, Telerik.Web.UI, Version=2010.2.929.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4'
Why is version 2010 being refrefenced in the error messge?
However the application will run and all of the controls work.
Why do I see this error message in design view and how can I fix it?
Hello,
I'm using Telerik RadEditor version 2015.1.401.35 on Chrome v54. When I add a link using Hyperlink Manager giving it an email address and a text, which is the same as the email address, the link doesn't show, but if the user hovers the mouse over the link then it shows, when moving the mouse away it hides again. Is there a fix for this issue?
Regards
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<!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
style
=
"background-color:White"
>
<
script
language
=
"javascript"
type
=
"text/javascript"
>
function MenuItemClicking(sender, args) {
var item = args.get_item();
if (item.get_level() === 0) {
args.set_cancel(true);
return;
}
alert('Menu item selected');
}
</
script
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
EnablePageMethods
=
"true"
>
</
telerik:RadScriptManager
>
<
div
>
<
telerik:RadMenu
ID
=
"RadMenu1"
runat
=
"server"
BorderStyle
=
"None"
OnClientItemClicking
=
"MenuItemClicking"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Data"
TabIndex
=
"-1"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Option 1"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Option 2"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Option 3"
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Info"
TabIndex
=
"-1"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Option 4"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Option 5"
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Help"
TabIndex
=
"-1"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Option 6"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Option 7"
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadMenu
>
</
div
>
</
form
>
</
body
>
</
html
>
Can you use a variable or a Session["variable"] as the ClientDetailTemplateId value? Or does it have to be a hard-coded string?
Thanks,
Shawn
Hi ,
I am radscheduler using Sql data source method.
<telerik:RadAjaxPanel ID="ajaxpanel1" runat="server">
<telerik:RadScheduler Width="940px" runat="server" ID="ASIScheduler" DataDescriptionField="Description"
DataEndField="End" DataRecurrenceParentKeyField="RecurrenceParentID" DataRecurrenceField="RecurrenceRule"
DataKeyField="ID" DataReminderField="Reminder" DataSourceID="SqlDataSource1"
DataStartField="Start" DataSubjectField="Subject"
EnableDescriptionField="True" Height="700px"
SelectedView="MonthView" OnAppointmentDataBound="ASIScheduler_AppointmentDataBound">
<Reminders Enabled="True" />
</telerik:RadScheduler>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DevConnString %>"
SelectCommand="SELECT [ID], [Subject], [start], [End], [RecurrenceRule], [RecurrenceParentID], [Reminder], [Description], [Annotations] FROM [EventCalendar]"
DeleteCommand="DELETE FROM [EventCalendar] WHERE [ID] = @ID" InsertCommand="INSERT INTO [EventCalendar] ([Subject], [Start], [End], [RecurrenceRule], [RecurrenceParentID], [Description],[Reminder]) VALUES (@Subject, @Start, @End, @RecurrenceRule, @RecurrenceParentID, @Description, @Reminder)"
UpdateCommand="UPDATE [EventCalendar] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [Description] = @Description WHERE [ID] = @ID"></asp:SqlDataSource>
</telerik:RadAjaxPanel>
When user tries to add new appointment , we are getting following error
Must declare the scalar variable "@Description".
but when user clicks new appointment and then click on "options" and fill in other details then appointment gets saved.
Please advise fix for this.