This is a migrated thread and some comments may be shown as answers.

Right click in Input and html textbox

1 Answer 44 Views
Input
This is a migrated thread and some comments may be shown as answers.
Ravi Shankar
Top achievements
Rank 1
Ravi Shankar asked on 18 Aug 2010, 01:03 PM
The right clcik on a normal html textbox yields the following menu options
1)Undo
2)Copy
3)Paste etc
but when I right click in a RadTextBox control the "Undo" option is always disabled even if I type some value in the text box. Pls. provide your suggestions.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 18 Aug 2010, 02:54 PM
Hello Ravi,

You can get back the Undo behavior by using the approach below. However, please test your scenario well, as unexpected side effects might occur.


<%@ Page Language="C#" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
<head runat="server">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>RadControls</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
 
<telerik:RadTextBox ID="RadTextBox1" runat="server" SelectionOnFocus="None" />
 
<asp:Button ID="Button1" runat="server" Text="PostBack" />
 
<script type="text/javascript">
 
Sys.Application.add_init(overrideBehavior);
 
function overrideBehavior()
{
    if (typeof(Telerik.Web.UI) != "undefined" && typeof(Telerik.Web.UI.RadInputControl) != "undefined")
    {
        Telerik.Web.UI.RadInputControl.prototype._updateHiddenValueOnKeyPress = function() {};
    }
}
 
</script>
 
</form>
</body>
</html>


All the best,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Input
Asked by
Ravi Shankar
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or