Getting these errors when trying to update spreadsheet cells. Uncaught TypeError: Cannot read property 'offsetWidth' of undefined
The issue is happening even on the demo component when editing a cell:
https://demos.telerik.com/aspnet-ajax/spreadsheet/examples/overview/defaultcs.aspx
Workaround from Admin:
Load the following script under the ScriptManager:
<script>
if (kendo && kendo.spreadsheet && kendo.spreadsheet.SheetEditor) {
kendo.spreadsheet.SheetEditor.fn.activate = function (options) {
var viewElement = this.view.element, viewWidth, scrollerElement, scrollbarWidth;
this._active = true;
this._rect = options.rect;
this._range = options.range;
this.cellInput.position(options.rect);
this.cellInput.resize(options.rect);
this.cellInput.tooltip(options.tooltip);
this.cellInput.activeCell = this.barInput.activeCell = this._range.topLeft();
this.cellInput.activeSheet = this.barInput.activeSheet = this._range._sheet;
if (viewElement) {
viewWidth = viewElement.width();
scrollerElement = viewElement.find('.' + kendo.spreadsheet.View.classNames.scroller)[0];
scrollbarWidth = scrollerElement.offsetWidth - scrollerElement.clientWidth;
this.cellInput.element.css('max-width', viewWidth - scrollbarWidth - this.cellInput.element.position().left + 'px');
}
this.trigger('activate');
return this;
}
}
</script>
When the EnableConfigurationPanel is enabled for the PivotGrid and is being rendered without having data bound to it, the "System.NullReferenceException: Object reference not set to an instance of an object." exception will be thrown.
To replicate the problem, add the following PivotGrid declaration to the page without binding data to it:
<telerik:RadPivotGrid ID="RadPivotGrid1" runat="server" EnableConfigurationPanel="true">
</telerik:RadPivotGrid>
By changing the application's thread Culture to Persian (fa-IR) and the Grid's RenderMode to Lightweight, the application fails with "System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values."
1. Change the application culture to Persian
protected void Page_Init(object sender, System.EventArgs e)
{
var culture = new System.Globalization.CultureInfo("fa-IR");
System.Threading.Thread.CurrentThread.CurrentCulture = culture;
System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
}
2. Change the RenderMode of the Grid to Lightweight
<telerik:RadGrid ID="RadGrid1" runat="server" RenderMode="Lightweight">
</telerik:RadGrid>
RadButton's focus state styling is missing in Bootstrap. Steps to reproduce: 1. Open https://demos.telerik.com/aspnet-ajax/button/examples/keyboardsupport/defaultcs.aspx?skin=Bootstrap 2. Focus any of the first buttons using the Tab key Result: No focus styles are applied Expected: Follow the steps above in Sunset skin ----------------------------------------- Workaround: button.RadButton.rbButton:focus { box-shadow: 0 3px 5px rgba(0, 0, 0, 0.125) inset; }
We have an issue where the RadEditor context menu for <td> element doesn't get displayed. It throws a "Permission Denied" error. Within <td> the table toolbar is not functional either. To reproduce: In an aspx page, create an updatepanel with a LoadContent button, RadEditor and Save button. 1. Click on Load Contents button 2. RadEditor with text "Loaded" will get displayed 3. Insert a table 4. Go to a table cell and verify context menu for td shows fine 5. Click Save 6. Go to a table cell and right click - context menu doesn't show (If you have IE developers tool, you will see "Permission Denied" error.) ASPx page: <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:UpdatePanel ID="upd" runat="server"> <ContentTemplate> <asp:Button ID="btnLoad" runat="server" Text="Load Contents" OnClick="btnLoad_Click" /> <telerik:RadEditor ID="HTMLEditor" runat="server"></telerik:RadEditor> <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" UseSubmitBehavior="false" /> </ContentTemplate> </asp:UpdatePanel> </asp:Content> C# Code: protected void Page_Load(object sender, EventArgs e) { } protected void btnSave_Click(object sender, EventArgs e) { HTMLEditor.Content = HTMLEditor.Content + " updated"; } protected void btnLoad_Click(object sender, EventArgs e) { HTMLEditor.Content = "Loaded"; }
Good morning,
we have a strange issue using RadGrid with horizontal scroll and frozen columns: there a resizing of the height which gets user experience not the best.
See attached gif.
Could you please help us?
I recently updated my website with the dll patch telerik provided for the cryptographic weakness: http://www.telerik.com/support/kb/aspnet-ajax/details/cryptographic-weakness?utm_medium=email After the update I found that the pages which were using the RadEditor control and several other controls was not loading and throwing this error: Parser Error Message: Decryption key specified has invalid hex characters. Several other controls are throwing this error but I cannot delete controls one by one and check which ones are having this problem. But I checked for the RadEditor and it was throwing this error. Nothing else is there on the page while testing other than this control. This does not happen on a plain new website and is happening when we have the sql mermbership and machine key configured. We are using passwordFormat as encrypted in sql membership config and cannot remove machine key. If you got to test it, then test it on some already configured machine key and sql membership website. I have attached screenshots for this error and telerik dll patch in use currently. We are on a production server and we need a solution for this issue ASAP.
<script runat="server">
protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
(sender as RadGrid).DataSource = Enumerable.Range(1, 10).Select(x => new { Id = x, Name = "Name " + x });
}
</script>
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecorationZoneID="test" DecoratedControls="All" />
<div id="test">
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="true"
EnableHeaderContextMenu="true" FilterType="HeaderContext">
</telerik:RadGrid>
</div>
Reproduction - http://somup.com/crVYIDot19
Setup to reproduce:
<telerik:RadContextMenu ID="RadContextMenu1" runat="server">
<Targets>
<telerik:ContextMenuDocumentTarget />
</Targets>
<Items>
<telerik:RadMenuItem Text="item">
<ItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" />
</ItemTemplate>
</telerik:RadMenuItem>
</Items>
</telerik:RadContextMenu>
<telerik:RadButton runat="server" ID="RadButton2" Text="Postback" AutoPostBack="true" />
Steps to reproduce:
Repro:
<telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet1" />
<telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet2" />
protected void Page_Load(object sender, EventArgs e)
{
var workbook = new Workbook();
var sheet1 = workbook.AddSheet();
AddDateRow(sheet1);
sheet1.Columns = new List<Column>() { new Column() { Index = 1, Width = 150 } };
RadSpreadsheet1.Sheets.Add(sheet1);
RadSpreadsheet2.Sheets.Add(sheet1);
RadSpreadsheet1.ColumnsCount = 5;
RadSpreadsheet1.RowsCount = 10;
}
private void AddDateRow(Worksheet sheet1)
{
var row = new Row() { Index = 0 };
Cell firstCell = new Cell() { Index = 0, Value = "Select Date:", Bold = true };
row.AddCell(firstCell);
Cell secondCell = new Cell() { Index = 1, Value = "", Bold = true, Background = "#fef0cd", Format = "mmmm d, yyyy" };
secondCell.Validation = new Validation()
{
AllowNulls = true,
DataType = "date",
ShowButton = true,
ComparerType = "between",
From = "DATEVALUE(\"1/1/2000\")",
To = "DATEVALUE(\"12/31/2020\")",
Type = "reject",
TitleTemplate = "Invalid date selected",
MessageTemplate = "Select a date between year 2000 and 2020."
};
row.AddCell(secondCell);
sheet1.AddRow(row);
}
<ExportSettings>
<Excel Format="Biff" DefaultCellAlignment="NotSet"/>
</ExportSettings>
Given a RadComboBox with search, if the user enters some search text and then clicks on one of the filtered entries in the dropdown list the validation event is fired as the entry box loses focus and results in a 'false' return from validation as it uses the 'Text' property which is the search string. Validation is then refired as a result of clicking on the entry. However, the initial 'false' return can cause unwanted behaviour in code that depends on the validation event. I can supply a sample project demonstrating the problem, but it needs more than the 10 MB upload limit.
Workaround(Approved by Admin):
<script>
// Place/load this script after the ScriptManager
if (Telerik.Web.UI.RadSpreadsheet) {
Telerik.Web.UI.RadSpreadsheet.prototype.original_initialize = Telerik.Web.UI.RadSpreadsheet.prototype.initialize;
Telerik.Web.UI.RadSpreadsheet.prototype.initialize = function () {
this.original_initialize();
this.add_parentShown(this.get_element());
}
Telerik.Web.UI.RadSpreadsheet.prototype.repaint = function () {
this.get_kendoWidget().refresh()
}
}
</script>
Reproduction:
<telerik:RadWizard runat="server" ID="RadWizard1">
<WizardSteps>
<telerik:RadWizardStep ID="WizardStep1" StepType="Start">
Step 1
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WizardStep3">
<telerik:RadSpreadsheet runat="server" ID="RadSpreadsheet1"></telerik:RadSpreadsheet>
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WizardStep4" StepType="Finish">
Finish step
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WizardStep5" StepType="Complete">
Completed!
</telerik:RadWizardStep>
</WizardSteps>
</telerik:RadWizard>
Hi
I got this dialog pop up when it was trying to upgrade my solution which had a few web sites in it.
It seemed to get lost. I dont know what the VS dialog with 'Description' is all about.
Not sure what triggers it to say it needed an update and yet there is nothing to update.
Its possible that there is a backup folder that it created from a previous upgrade and it is looking at an old DLL in that project.
Anyway, sure you will sort it out :)
Thanks
Doug
Put more than two RadDatePicker with single SharedCalendar on page. some RadDatePicker are in side of UpdatePanel with a button in it. when I press that button RadDatePicker behaviour is strange. RadDatePicker inside UpdatePanel not opening Calendar popup while RadDatePicker outside UpdatePanel opens calendar popup but gives javascript error on any date selection. the javascript error is "Unable to get property '_selectedDates' of undefined or null reference". It looks like it is destroying shared calendar object on partial postback. Please find below sample code to replicate the issue. after clicking "Submit" button, it doesn't open calendar popup for "Date 2" and for "Date 1" it opens but doesn't allow to select date and gives JavaScript error. ---------------------- <asp:ScriptManager ID="sc1" runat="server" /> <telerik:RadCalendar ID="dtCal" runat="server" EnableMultiSelect="false" /> Date 1: <telerik:RadDatePicker ID="dt1" Width="103px" runat="server" SharedCalendarID="dtCal" /> <hr /> <asp:UpdatePanel runat="server" ID="up"> <ContentTemplate> Date 2: <telerik:RadDatePicker ID="dt2" Width="103px" runat="server" SharedCalendarID="dtCal" /> <br /> <asp:Button runat="server" ID="btnDT" Text="Submit" /> </ContentTemplate> </asp:UpdatePanel> ---------------------- When i add all controls in UpdatePanel it works properly. but Actual code is much more complex than above sample with too many lines of javascript code and many date pickers on single page and simply all Calendar and DatePicker controls can not be moved in UpdatePanel.