What's causing the Telerik RadEditor to place the CSS "t-no-boxshadow t-no-flexbox t-ie t-ie7" on the HTML element of my page. When it renders like this the styling of the toolbars is incorrect.
I'm running in IE11, but my page is derived from a in-house framework class rather than System.Web.UI.Page. Something in the custom class seems to be triggering the RadEditor to place this CSS on the HTML element.
I'm using a trial version to test if updating an old 2013 version of the RadEditor will fix a bug we're having. The update fixes the bug we had, but it's causing another one in Edge. When typing into the editor in Edge the first character typed after a newline is always ignored.
Hi telerik team:
I want to cancel editing on client side without running "OnCommand" event, because NeedDataSource rebind current grid data.
How can I acomplish that functionality?
Attached is the issue I'm seeing. How could I run "Cancel" editing grid on client side, outside "OnCommand" event?
<telerik:RadGrid RenderMode="Lightweight" ID="grdPTOPlanItemRates" GridLines="None" runat="server" AllowAutomaticDeletes="false" OnNeedDataSource="grdPTOPlanItemRates_NeedDataSource"
AllowAutomaticInserts="false" PageSize="10" Skin="Outlook"
AllowAutomaticUpdates="false" AllowPaging="True"
AutoGenerateColumns="False">
<MasterTableView CommandItemDisplay="Top" DataKeyNames="PTOPlanItemRateId" ClientDataKeyNames="PTOPlanItemRateId" NoDetailRecordsText="No PTO Plan Item Rates Records to display"
NoMasterRecordsText="No PTO Plan Item rates records were found" CommandItemSettings-AddNewRecordText="Add New" CommandItemSettings-ShowSaveChangesButton="false" CommandItemSettings-ShowCancelChangesButton="false" CommandItemSettings-ShowRefreshButton="false"
HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False">
<BatchEditingSettings EditType="Row" />
<Columns>
<telerik:GridButtonColumn ConfirmText="Delete this row?" ConfirmDialogType="RadWindow"
ConfirmTitle="Delete" HeaderText="" HeaderStyle-Width="50px"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
</telerik:GridButtonColumn>
<telerik:GridBoundColumn UniqueName="PTOPlanItemRateId" Visible="false" DataField="PTOPlanItemRateId"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Rate" HeaderStyle-Width="70px" HeaderText="Rate" SortExpression="Rate"
UniqueName="Rate">
<ColumnValidationSettings EnableRequiredFieldValidation="true">
<RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
</RequiredFieldValidator>
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="StartYear" HeaderStyle-Width="70px" HeaderText="Start Year" SortExpression="StartYear"
UniqueName="StartYear">
<ColumnValidationSettings EnableRequiredFieldValidation="true">
<RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
</RequiredFieldValidator>
</ColumnValidationSettings>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="EndYear" HeaderStyle-Width="70px" HeaderText="End Year" SortExpression="EndYear"
UniqueName="EndYear">
<ColumnValidationSettings EnableRequiredFieldValidation="true">
<RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
</RequiredFieldValidator>
</ColumnValidationSettings>
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings AllowKeyboardNavigation="true">
<ClientEvents />
</ClientSettings>
</telerik:RadGrid>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="#" onclick="javascript: SavePTOPlanItemRates();" class="button primary">Save</a>
<a href="#" onclick="javascript: CancelChanges();" class="button primary">Cancel Changes</a>
</td>
</tr>
</table>
<script>
function OpenPTOPlanItemRates(payTypeId) {
var exitFlag = false;
currentPayTypeId = payTypeId;
$.ajax({
type: "POST",
url: "ConfigurationHandler.ashx?w=getPTOPlanItemRates&PTOPlanId=" + currentPTOPlanId + "&PayTypeId=" + payTypeId,
async: false,
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('Error:' + textStatus);
alert('Error:' + errorThrown);
},
success: function (data, textStatus, XMLHttpRequest) {
if (data != 'undefined')
{
if (data.length > 0) {
if (data == "logout") {
exitFlag = true;
}
else {
$("#divPTOPlanItemRates").dialog({
autoOpen: true,
title: "Add/Edit PTO Plan Item Rates",
width: "600px",
modal: true
});
updateGridPTOPlanItemRates(data);
}
}
else {
//
alert("No data");
}
}
}
});
if (exitFlag) {
parent.location = "Login.aspx";
return false;
}
}
function updateGridPTOPlanItemRates(data) {
//var data = [{ "ID": "1", "Rate": "1", "StartYear": "1998", "EndYear": "1999" }, { "ID": "2", "Rate": "2", "StartYear": "2005", "EndYear": "20018" }];
var masterTableView = $find("<%= grdPTOPlanItemRates.ClientID %>").get_masterTableView();
if (data != null) {
var list = JSON.parse(data);
masterTableView.set_dataSource(list.PTOPlanItemRatesList);
masterTableView.dataBind();
}
else {
//rebind with no data
masterTableView.set_dataSource([]);
masterTableView.dataBind();
}
}
function CancelChanges()
{
OpenPTOPlanItemRates(currentPayTypeId);
}
function SavePTOPlanItemRates()
{
var grid = $find('<%=grdPTOPlanItemRates.ClientID%>');
var masterView = grid.get_masterTableView();
var jsonArr = [];
var row = null;
var recordsCount = masterView.get_dataItems().length;
for (var i = 0; i < recordsCount; i++) {
row = masterView.get_dataItems()[i];
jsonArr.push({
rate: row.get_cell('Rate').innerText,
startYear: row.get_cell('StartYear').innerText,
endYear: row.get_cell('EndYear').innerText,
});
}
SavePTOIRChangesAjaxCall(jsonArr, recordsCount);
}
function SavePTOIRChangesAjaxCall(oData, recordsCount)
{
var exitFlag = false;
var saved = false;
$.ajax({
type: "POST",
url: "ConfigurationHandler.ashx?w=SavePTOItemRates&PTOPlanId=" + currentPTOPlanId + "&PayTypeId=" + currentPayTypeId + "&RecordsCount=" + recordsCount,
async: false,
data: "data=" + JSON.stringify(oData),
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('' + textStatus);
alert('' + errorThrown);
},
success: function (data, textStatus, XMLHttpRequest) {
//$("#status img").hide();
if (data.length > 0) {
if (data == "logout") {
exitFlag = true;
}
else {
saved = true;
}
}
}
});
if (exitFlag) {
parent.location = "Login.aspx";
return false;
}
if (saved)
{
alert('PTO Plan Item Rates were succesfully saved.');
}
}
</script>
Hi,
I need to have a dialog pop up after a custom button is clicked to gather further information for the insertion of the element.
For example, I need to have a click on the (custom) insert radio-button pop up a dialog asking the name and the text for the radio button and then insert the radio button with the collected information.
Is there any way to do this?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileAttachmentTest.aspx.cs" Inherits="FileAttachmentTest" %>
<%@ 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"
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
telerik:RadSkinManager
ID
=
"QsfSkinManager"
runat
=
"server"
ShowChooser
=
"true"
/>
<
telerik:RadFormDecorator
ID
=
"QsfFromDecorator"
runat
=
"server"
DecoratedControls
=
"All"
EnableRoundedCorners
=
"false"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
UpdatePanelsRenderMode
=
"Inline"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadMaskedTextBox1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadAsyncUpload1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadMaskedTextBox1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
div
>
<
telerik:RadAsyncUpload
runat
=
"server"
ID
=
"RadAsyncUpload1"
OnClientAdded
=
"keyboardSupport"
AccessKey
=
"P"
OnClientFileUploading
=
"onClientFileUploading"
DisablePlugins
=
"true"
>
</
telerik:RadAsyncUpload
>
</
div
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
debugger
var $ = $telerik.$;
var $cancelButton;
// keyboardSupport() method activates focusing with TAB key
function keyboardSupport(sender, args) {
var $fileInput = $(".ruFileInput", args.get_row());
$fileInput.attr("tabindex", "1")
var $selectButton = $(".ruButton.ruBrowse", args.get_row());
$fileInput.focus(function (e) {
$selectButton.css("border", "1px dotted");
});
$fileInput.blur(function (e) {
$selectButton.css("border", "0px");
});
if ($telerik.isIE) {
$fileInput.keydown(function (e) {
if (e.keyCode == Sys.UI.Key.tab && e.shiftKey == false) {
$fileInput.parent().focus();
}
if (e.keyCode == Sys.UI.Key.tab && e.shiftKey == true) {
e.preventDefault();
if ($cancelButton != undefined)
$cancelButton.focus();
else
$fileInput.parent().focus();
}
});
}
}
function onClientFileUploading(sender, args) {
$(".ruFileInput", args.get_row()).attr("tabindex", "-1");
$cancelButton = $(".ruCancel", args.get_row());
$cancelButton.attr("tabindex", "1");
}
$(document).keydown(function (e) {
var accesskey = $find("<%=RadAsyncUpload1.ClientID%>")._accessKey;
if ($telerik.isFirefox) {
if (e.altKey == true && e.shiftKey == true && e.which == accesskey.charCodeAt()) {
focusOnFirstInput();
}
}
if ($telerik.isChrome || $telerik.isSafari || $telerik.isIE) {
if (e.altKey == true && e.which == accesskey.charCodeAt()) {
focusOnFirstInput();
}
}
});
function focusOnFirstInput() {
var firstInput = $("input[type='file']", $get("<%=RadAsyncUpload1.ClientID%>"))[0];
if (firstInput != undefined) {
firstInput.focus();
}
}
</
script
>
</
telerik:RadCodeBlock
>
</
form
>
</
body
>
</
html
>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class FileAttachmentTest : ETOPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
Hello Telerik Team,
It appears that if content has been inserted into the editor, when it is cut it is not copied to clipboard, it is just deleted. This behaviour can be reproduced in your track changes demo by typing some content, highlighting it and hitting ctrl + x. Upon trying to paste, the cut content is not pasted.
Is this a known bug, or is there any temporary fix you can provide.
looking forward to hearing back from you,
Aidan Harris
Write something in the RadEditor. Then press the "Do postback" button. The RadEditor is blanked out! We hope this will be fixed really fast. Breaks our entire application!!! Regards Rikard<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
<!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"
>
<
asp:ScriptManager
ID
=
"ccc"
runat
=
"server"
>
</
asp:ScriptManager
>
<
div
>
<
telerik:RadToolBar
ID
=
"rtb"
runat
=
"server"
AutoPostBack
=
"True"
>
<
Items
>
<
telerik:RadToolBarButton
id
=
"rtbb"
runat
=
"server"
Text
=
"Do postback"
>
</
telerik:RadToolBarButton
>
</
Items
>
</
telerik:RadToolBar
>
<
asp:ValidationSummary
ID
=
"ValidationSummary"
runat
=
"server"
/>
<
telerik:RadEditor
ID
=
"re"
runat
=
"server"
>
</
telerik:RadEditor
>
<
asp:TextBox
ID
=
"txt"
runat
=
"server"
></
asp:TextBox
>
<
asp:RequiredFieldValidator
ID
=
"rfv"
runat
=
"server"
ControlToValidate
=
"txt"
EnableClientScript
=
"false"
></
asp:RequiredFieldValidator
>
</
div
>
</
form
>
</
body
>
</
html
>
Language : : C#, ASP.NET
How can I set default DateTime value in RadDateTimePicker. Default value should be one day greater than the current date with time as "12:00 AM". How can I do this?
I am working with Radgrid checklist filtering. Actually I need to filter “BAD IS SCORE”. This causes problem for me. And I can’t make EnableLinqExpressions as false. "bad is score" works fine. There is a problem with capital keywords.
Is there a way to filter with keywords like IS and without making EnableLinqExpressions as false?