Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
61 views

I want to restrict the editing of a RadEditor, but I don't want to set its server-side Enabled property to false. 

Using client-side JavaScript, I'm using editor.enableEditing(false), but this still allows the user to delete or backspace to remove content.  It does not allow adding new content, nor respond to any other key.

I've tried to add an event listener for the onkeydown and keydown event to prohibit the delete and backspace keys, but that doesn't stop the user from deleting content, either. 

While debugging, I noticed that the content gets deleted prior to hitting the e.preventDefault() that is intended to stop it. 

How can I accomplish this task?


editor.enableEditing(false);
     editor.get_contentArea().onkeydown = e => {                         
         if (e.keyCode === 8 || e.keyCode === 46) { // Prevent Backspace (8) and Delete (46)
             e.preventDefault();
             e.stopPropagation();
             e.stopImmediatePropagation();
             return false;
         }
     };
                

Rumen
Telerik team
 answered on 02 Nov 2024
1 answer
75 views

Good morning! I would like to know if it is possible to save the state of the radtreelist with the nodes that were opened or closed and this way when the user reloads the screen it will be displayed the way it was before?

Radtreelist asp.net c#

Vasko
Telerik team
 answered on 31 Oct 2024
1 answer
59 views

Two issues on the RadScheduler Weekview column header:

  1. How to disable the clickable link in the column header?
  2. We want to only show dayname as header eg. "Sunday Monday Tuesday". What format string to use herefore?

Thanks,

Marc

 

Vasko
Telerik team
 answered on 31 Oct 2024
1 answer
106 views

How can I get the index of the series item on a Line Chart when clicking on it?

I am using OnSeriesClick

        function OnSeriesClick(args) {
            alert(args.value);
        }

I don't care about the value of the item, what I need is the index of it in the series.

Thanks,

 


Vasko
Telerik team
 answered on 31 Oct 2024
1 answer
66 views
In the gantt chart web client, when I shift one of the tasks that has a chain of dependent tasks below it, the dependencies don't shift the same number of days; I have to manually edit each one.

Am I missing something, or is this not a feature?

Thanks!
Rumen
Telerik team
 answered on 31 Oct 2024
0 answers
88 views

Hi Telerik Team,

One of our requirements is to keep the timeline column header fixed during vertical scrolling when there are numerous records displayed that extend beyond the default view. This feature is essential for improving user navigation and readability.

The following picture depicts the implementation. 

 

The output. 

Could you please advise if there is a method or configuration available to achieve this behavior within the Telerik RadScheduler component?

 Regards,

Sathyendranath

Sathyendranath
Top achievements
Rank 1
Iron
Iron
 asked on 28 Oct 2024
1 answer
45 views

I would like to disable ability to click on chart legend items.

Any ideas?

 

Thank you

Vasko
Telerik team
 answered on 28 Oct 2024
1 answer
84 views

I am using a RadCaptcha control in my web page. If I don't input anything in the textbox of RadCaptcha or enter an invalid code, then after the ajax postback returns the client-side Validity object for the RadCaptcha textbox as shown below is always showing that RadCaptcha is valid when it's not. I thought the Validity object should reflect the invalid state of RadCaptcha.  There is only one RadCaptcha in my web page.

Why is the client-side Validity object on RadCaptcha's textbox not showing the correct state? Can I check on the client-side if RadCaptcha is valid since the Validity object is not reliable. I am using Telerik ASP.NET AJAX Q2 2020 version.

Rumen
Telerik team
 answered on 25 Oct 2024
1 answer
64 views
This is a test project I'm working on, here is the .master page

<%@ Master Language="VB" CodeFile="TelMenu.master.vb" Inherits="ZForges_TelMenu" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <title></title>

    <meta name="viewport" content="width=device-width, initial-scale=1 shrink-to-fit=no">

    
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript"> 

       
            function OnClientItemClicking(sender, args)
            {                
                if (args.get_item().get_navigateUrl() === null)
                {
                    args.get_item().open();
                    args.set_cancel(true);
                }
            }
          
        </script>
    </telerik:RadCodeBlock>

</head>
<body >
    <form id="form1" runat="server">       
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <div class="container-fluid">
            <div class="row BannerRow">
                <div class="col-10 col-sm-6 text-left h3">
                    Title here
                </div>                
            </div>
     
            <div class="row">
                <div class="col-12">
                    <%--<telerik:RadMenu ID="rdMenu" runat="server" ShowToggleHandle="true" OnClientItemClicking="OnClientItemClicking" ExpandAnimation-Type="None" CollapseAnimation-Type="None"></telerik:RadMenu>--%>
                    <telerik:RadNavigation ID="rdNav" runat="server" MenuButtonPosition="Left"></telerik:RadNavigation>
                </div>
            </div>

            <div class="row">
                <div class="col-12">
                    <asp:ContentPlaceHolder id="cpMain" runat="server">
                    </asp:ContentPlaceHolder>
                </div>
            </div>
        </div>

     
    </form>   
</body>
</html>

the code behind of the .master page below

Imports System.Data
Imports Telerik.Web.Device.Detection
Imports Telerik.Web.UI

Partial Class ZForges_TelMenu
    Inherits System.Web.UI.MasterPage

    Private Sub ZForges_TelMenu_Load(sender As Object, e As EventArgs) Handles Me.Load
        Try

            If Not IsPostBack Then

                LoadMenu(Session("UserID"))

             
            End If

        Catch ex As Exception
           
        End Try
    End Sub

    Private Sub LoadMenu(iUserID As Integer)
        Try
            Dim objUser As New TestClass

            'rdMenu.DataSource = objUser.GetUserMenu(iUserID)
            'rdMenu.DataTextField = "MenuName"
            'rdMenu.DataNavigateUrlField = "URL"
            'rdMenu.DataFieldID = "MenuID"
            'rdMenu.DataValueField = "MenuID"   
            'rdMenu.DataFieldParentID = "ParentID"
            'rdMenu.DataBind()


            rdNav.DataSource = objUser.GetUserMenu(iUserID)
            rdNav.DataTextField = "MenuName"
            rdNav.DataNavigateUrlField = "URL"
            rdNav.DataFieldID = "MenuID"
            rdNav.DataFieldParentID = "ParentID"
            rdNav.DataBind()

            objUser = Nothing

        Catch ex As Exception
         
        End Try
    End Sub



End Class


a simple .aspx page with a radbutton on it

<%@ Page Title="" Language="VB" MasterPageFile="~/ZForges/TelMenu.master" AutoEventWireup="false" CodeFile="Welcome.aspx.vb" Inherits="ZForges_Welcome" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpMain" Runat="Server">      
    Welcome Page    
    <telerik:RadButton ID="btnSearch" runat="server" Text="RadButton"></telerik:RadButton>

</asp:Content>


the radnavigation loads just fine for the first time, then its contents disappear after a postback
when I click the radbutton on the child page (welcome.aspx) the rad navigation contents disappear, if I use a radmenu instead, its able to hold the values

can someone explain whats going on?
Attila Antal
Telerik team
 answered on 22 Oct 2024
1 answer
267 views
I am using the file upload feature and getting a 403 error in the OnClientFileUploadFailed function. It only occurs on some files not all. I have already confirmed it is not an issue with the file extension. I am also confident it is not an issue with file size.

Any ideas why this could be happening? What are situations where a 403 error would occur here? Are there any steps I could take to further narrow down the issue?
Rumen
Telerik team
 answered on 22 Oct 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?