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

Rad Grid Grives runtine javascript error on refresh

5 Answers 97 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hrushikesh Mokashi
Top achievements
Rank 1
Hrushikesh Mokashi asked on 22 Jul 2008, 10:21 AM
I am using RadControl Asp.net ajax Q1 2008


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

Sort by
0
Daniel
Telerik team
answered on 23 Jul 2008, 01:32 PM
Hello Hrushikesh,

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
0
Hrushikesh Mokashi
Top achievements
Rank 1
answered on 24 Jul 2008, 01:33 PM

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






0
Bruno
Top achievements
Rank 2
answered on 27 Jul 2008, 08:59 AM
Try to update to the latest version (Q2 2008) and let me know if the problem persists.
0
Daniel
Telerik team
answered on 28 Jul 2008, 08:49 AM
Hello 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.
0
StephenWRogers
Top achievements
Rank 1
answered on 29 Jul 2008, 11:32 AM
I think you'll probably find this is the same error as in this thread - Sys.InvalidOperationException:

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
Tags
General Discussions
Asked by
Hrushikesh Mokashi
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Hrushikesh Mokashi
Top achievements
Rank 1
Bruno
Top achievements
Rank 2
StephenWRogers
Top achievements
Rank 1
Share this question
or