I am using RadAjaxManager And RadAjaxLoadingPanel and rad grid
<telerik:RadAjaxManager ID="rdAjaxManagerHistoryGrid" runat="server" EnableAJAX="true"
DefaultLoadingPanelID="LoadingPnlCustom" >
<ajaxsettings>
<telerik:AjaxSetting AjaxControlID="btnRefreshHistory">
<updatedcontrols>
<telerik:AjaxUpdatedControl ControlID="rGridHistories"
LoadingPanelID="LoadingPnlCustom" /></updatedcontrols></telerik:AjaxSetting>
</ajaxsettings>
</<telerik:RadAjaxManager >
When i click on refresh button of grid it gives me following error.
if i set allowscroll property of clientsetting to false then it not gives me a error.
But i want allowscroll property to be true.
error are as follows.
Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.
5 Answers, 1 is accepted
I tried to recreate this case but it seems that the problem is not caused by the code you provided.
I found that you have another post on this subject -> Rad grid Give error on refresh button and I saw that you are still not answered the previous post. Did you try the proposed suggestions?
The best option would be to isolate the problem in a simplified working project and send it to us in order to debug it locally and thus give you the appropriate answer.
Kind regards,
Daniel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Hi Daniel,
Thanx for the reply. That error was resolved when I added new button.
Now i am getting the same error on page load.
On my page i have tabs. On first page load I am showeing 1st tab with radGrid.
To show LoadingPanel on Radgrid on page load I am adding the grid in RadAjaxmanager.
If Not IsPostBack then
rdAjaxManager1.AjaxSettings.AddAjaxSettings (rdAjaxManager1,rdGrid History,LoadingPnlCustom)
End If
Also I am using AjaxRequest function.
Protected Sub rdAjaxManagerHistoryGrid_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles rdAjaxManagerHistoryGrid.AjaxRequest
Try
If e.Argument = "InitialPageLoad" Then
'simulate longer page load
'System.Threading.Thread.Sleep(2000)
If radTabTemp.SelectedIndex = 0 Then
rdAjaxManager1.AjaxSettings.AddAjaxSettings (rdAjaxManager1,rdGridHistory,LoadingPnlCustom)
rdGridHistory.DataSource = Me.HistoryData
rdGridHistory.Rebind()
End If
Session("TabClick") = "false"
End If
Catch ex As Exception
End Try
End Sub
Above function I am calling from Client side script:
window.onload = function()
{
if ('<%= Session("TabClick") %>'=="true")
{
setTimeout( function(){
$find("<%= rdAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad"); }, 200);
}
}
If I remove any of the "rdAjaxManager1.AjaxSettings.AddAjaxSettings (rdAjaxManager1,rdGridHistory,LoadingPnlCustom)
" line.
It does not shows me the error but it dose not shows me the LoadingPanle on grid on page load.
Can you please let me know what could be it's cause or If I am missing anything here? It does not throws error regularly. Sometimes it throws error on Page Load and after Build->Run one or two times it runs properly.
In one of the thread I read that a Patch was needed when same error was thrown for Treeview control.
If I want to send a project how can I send here?
Best Regards,
Hrushikesh
As I said before it will be hard to find what is causing this error without the possibility to debug it locally.
Please try to download the new version of our RadControls suite and check if you still have issues. Additionally this will enable you to send us a support ticket (you receive one month free support from the date of download).
Regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
When scrolling is on, code is run to attach a resize handler to the window, but there is a possibility that it could be removed before it has been added.
Stephen