I have a RadGrid which is constructed in code behind, and datasource is set in the OnNeedDataSource event.
Everything works fine, filling the radgrid, selecting rows and so on.
But when I ajaxify the grid, either by putting it in an asp updatepanel, radajaxpanel or by using radajaxmanager, the postback works fine, but when i select a row in the grid I get this javascript error: "JavaScript runtime error: Unable to get property 'toLowerCase' of undefined or null reference". Presumably because it can't find document.activeElement.
The javascript code that goes wrong in telerik:
If I first select all rows, by checking the checkbox in the gridcolumn, the error doesn't appear when i select a single row.
Everything works fine, filling the radgrid, selecting rows and so on.
But when I ajaxify the grid, either by putting it in an asp updatepanel, radajaxpanel or by using radajaxmanager, the postback works fine, but when i select a row in the grid I get this javascript error: "JavaScript runtime error: Unable to get property 'toLowerCase' of undefined or null reference". Presumably because it can't find document.activeElement.
The javascript code that goes wrong in telerik:
var
a=document.activeElement;
if
(a&&a.tagName.toLowerCase()===
"input"
){document.activeElement.blur();
If I first select all rows, by checking the checkbox in the gridcolumn, the error doesn't appear when i select a single row.
10 Answers, 1 is accepted
0
Hi Brian,
I am afraid that the provided information is not sufficient to find the source of issue. Could you share your full source code with the code-behind so me and anyone who would like to help could better understand your case and assist you further?
Regards,
Viktor Tachev
Telerik
I am afraid that the provided information is not sufficient to find the source of issue. Could you share your full source code with the code-behind so me and anyone who would like to help could better understand your case and assist you further?
Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Markus Hopfenspirger
Top achievements
Rank 2
answered on 11 Jul 2013, 10:36 AM
Hi Brian,
did you find a solution? I have the same problem on some of my grids if shown in a RadWindow but in a isolated testproject everything works fine... so it is something on my side - but what??? Any hint would be great!
Kind regards,
Markus
did you find a solution? I have the same problem on some of my grids if shown in a RadWindow but in a isolated testproject everything works fine... so it is something on my side - but what??? Any hint would be great!
Kind regards,
Markus
0
Brian
Top achievements
Rank 1
answered on 11 Jul 2013, 10:44 AM
Hi Markus
I still haven't found a solution, or what is causing the problem, I've been busy with other areas of my project.
My aspx page, where the grid is implemented, has a masterpage, which is in an iframe.
I don't know if this can help to identity the problem?
I still haven't found a solution, or what is causing the problem, I've been busy with other areas of my project.
My aspx page, where the grid is implemented, has a masterpage, which is in an iframe.
I don't know if this can help to identity the problem?
0
Markus Hopfenspirger
Top achievements
Rank 2
answered on 11 Jul 2013, 10:56 AM
Hi Brian,
thanks for the quick reply! So we are both in a iFrame...
Do you use the newest Version of Telerik Controls? I want to switch to the newest Version this Weekend and hope that the Problem is gone. If not I will investigate further and share results here...
Greetings, Markus
thanks for the quick reply! So we are both in a iFrame...
Do you use the newest Version of Telerik Controls? I want to switch to the newest Version this Weekend and hope that the Problem is gone. If not I will investigate further and share results here...
Greetings, Markus
0
Brian
Top achievements
Rank 1
answered on 11 Jul 2013, 11:01 AM
The version I am running should be the latest. TRIAL 2013.2 611 (Jun. 12, 2013)
0
Markus Hopfenspirger
Top achievements
Rank 2
answered on 11 Jul 2013, 11:20 AM
thanks for the info. So the update will probably bring no help... I will see if I can reproduce the Problem in a sample Project next week.
0
Alexandre
Top achievements
Rank 1
answered on 09 Sep 2013, 09:31 PM
Olá,
Segue um exemplo de codigo onde é apresentado o erro toLowerCase,
O erro ocorre quando é realizado alguma ação ajax na grid, por exemplo, fechar o group e logo após abrir e clicar diretamente na linha.
Se clicar fora da grid e logo após o erro não é mais apresentado.
O erro é apresentado tambem quando se ordena a grid.
Se voce abrir diretamente o programa RadGroupedGridForm.aspx, o erro nao é apresentado em nenhum caso, ele é apresentado apenas em iframe ou frames.
Hello,
An example of code where the error is displayed toLowerCase,
The error occurs when some action is performed in ajax grid, for example, closing the group and soon after opening and click directly on the line.
If you click outside the grid and immediately after the error is no longer displayed.
The error is also displayed when orders grid.
If you open the program directly RadGroupedGridForm.aspx, the error is not presented in any case, it is only displayed in frames or iframes.
Default.aspx
RadGroupedGridForm.aspx
Segue um exemplo de codigo onde é apresentado o erro toLowerCase,
O erro ocorre quando é realizado alguma ação ajax na grid, por exemplo, fechar o group e logo após abrir e clicar diretamente na linha.
Se clicar fora da grid e logo após o erro não é mais apresentado.
O erro é apresentado tambem quando se ordena a grid.
Se voce abrir diretamente o programa RadGroupedGridForm.aspx, o erro nao é apresentado em nenhum caso, ele é apresentado apenas em iframe ou frames.
Hello,
An example of code where the error is displayed toLowerCase,
The error occurs when some action is performed in ajax grid, for example, closing the group and soon after opening and click directly on the line.
If you click outside the grid and immediately after the error is no longer displayed.
The error is also displayed when orders grid.
If you open the program directly RadGroupedGridForm.aspx, the error is not presented in any case, it is only displayed in frames or iframes.
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
title
>::: Processor Performance Management :::</
title
>
</
head
>
<
frameset
rows
=
"0,*"
border
=
"0"
id
=
"processorbi"
>
<
frame
src
=
"RadGroupedGridForm.aspx"
noresize
name
=
"main"
id
=
"main"
/>
<
frame
src
=
"RadGroupedGridForm.aspx"
name
=
"SPLASH"
id
=
"SPLASH"
scrolling
=
"no"
/>
</
frameset
>
</
html
>
RadGroupedGridForm.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadGroupedGridForm.aspx.cs" Inherits="RadGroupedGridForm" %>
<!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
>
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
/>
</
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"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
>
</
telerik:RadAjaxLoadingPanel
>
<
telerik:RadGrid
ID
=
"RadGrid1"
DataSourceID
=
"SqlDataSource1"
runat
=
"server"
PageSize
=
"20"
AllowSorting
=
"True"
AllowMultiRowSelection
=
"True"
AllowPaging
=
"True"
ShowGroupPanel
=
"True"
AutoGenerateColumns
=
"False"
GridLines
=
"none"
>
<
PagerStyle
Mode
=
"NextPrevNumericAndAdvanced"
></
PagerStyle
>
<
MasterTableView
Width
=
"100%"
>
<
GroupByExpressions
>
<
telerik:GridGroupByExpression
>
<
SelectFields
>
<
telerik:GridGroupByField
FieldAlias
=
"PessoaStatus"
FieldName
=
"PessoaStatus"
HeaderValueSeparator
=
" from date: "
></
telerik:GridGroupByField
>
</
SelectFields
>
<
GroupByFields
>
<
telerik:GridGroupByField
FieldName
=
"PessoaStatus"
SortOrder
=
"Descending"
></
telerik:GridGroupByField
>
</
GroupByFields
>
</
telerik:GridGroupByExpression
>
</
GroupByExpressions
>
<
Columns
>
<
telerik:GridBoundColumn
SortExpression
=
"PessoaStatus"
HeaderText
=
"PessoaStatus"
HeaderButtonType
=
"TextButton"
DataField
=
"Status"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"PessoaNome"
HeaderText
=
"From"
HeaderButtonType
=
"TextButton"
DataField
=
"Nome"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
SortExpression
=
"PessoaEmail"
HeaderText
=
"Folder name"
HeaderButtonType
=
"TextButton"
DataField
=
"Email"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
ReorderColumnsOnClient
=
"True"
AllowDragToGroup
=
"True"
AllowColumnsReorder
=
"True"
>
<
Selecting
AllowRowSelect
=
"True"
></
Selecting
>
<
Resizing
AllowRowResize
=
"True"
AllowColumnResize
=
"True"
EnableRealTimeResize
=
"True"
ResizeGridOnColumnResize
=
"False"
></
Resizing
>
</
ClientSettings
>
<
GroupingSettings
ShowUnGroupButton
=
"true"
></
GroupingSettings
>
</
telerik:RadGrid
>
<
br
/>
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
ConnectionString="<%$ ConnectionStrings:COnnectToLowerCase %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Pessoa" runat="server"></
asp:SqlDataSource
>
</
form
>
</
body
>
</
html
>
0
Hi,
I was unable to reproduce the issue at my end. Therefore based on your description and code provided I have created a sample project. Try to reproduce the problem using it. In case you succeed, please send us the exact steps that need to be followed.
Regards,
Deyan Enchev
Telerik
I was unable to reproduce the issue at my end. Therefore based on your description and code provided I have created a sample project. Try to reproduce the problem using it. In case you succeed, please send us the exact steps that need to be followed.
Regards,
Deyan Enchev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Alexandre
Top achievements
Rank 1
answered on 12 Sep 2013, 04:45 PM
0
Hi,
Telerik
By examining the error you are receiving I can verify that this problem has been fixed in our latest release. Therefore I would suggest you to upgrade your environment to 2013 Q2 SP1 version of RadControls and see if the error still occurs.
Regards,
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.