RadAjaxLoadingPanel not showing when javascript call postback on button

1 Answer 49 Views
Ajax AjaxLoadingPanel
Vincent
Top achievements
Rank 1
Iron
Iron
Vincent asked on 21 Apr 2022, 03:20 PM | edited on 21 Apr 2022, 03:21 PM

VS2022 /Framework 4.7.2 / Vb.net / WebSite / Telerik 2022.1.119.45

Context :

Page1 contains :

  • RadAjaxLoadingPanel Modal (Id=RALP)
  • RadAjaxPanel (Id= RAP1 associate to RALP)
  • 1 button to go Page2
  • 1 button to call a job (and after job, reload page with new elements)
  • and other things...

    Page2 contains :
  • forms and elements for a reunion.
  • return button to page1
  • valid button to update writting during reunion in database before run job. (Set session to say to refresh data to page1)

Page1, if i click on different buttons (including button for call job) and elements, is good i've got RadAjaxLoadingPanel 
Page2 to page1 by return button : Good
Page2 to page1 by valid button :  i've got problem with RadAjaxLoadingPanel :

simulate click button (see code), RadAjaxLoadingPanel not showing (user can click), after treatment content was refreshed. all elements clicked in page not display  RadAjaxLoadingPanel 

no javascript error in Chrome.

Code Behind :

Page1 :

Private Sub Planning_Load(sender As Object, e As EventArgs) Handles Me.Load
    If IsPostBack = False Then
            If Session("Planning_RunJob") = 1 Then
                PrepareRunJob()
            End If
       '... other treatement
   End If
End Sub


Private Sub PrepareRunJob()

	Session.Remove("Planning_RunJob")
	Dim btRefresh as string = btJobOperation.UniqueID
	
	'Simulate click button for run run after page load, for user to inform is in update
	
	
	Dim sc As String = $"setInterval(__doPostBack('{btRefresh}',''), 10000);"
    ClientScript.RegisterStartupScript(Page.GetType, "refresh", $"{sc}", True)

End Sub

Private sub Runjob()

  'Simulate job
  Threading.Thread.Sleep(10000)
  litE4.Text = "REFRESHED !"

End Sub

Private Sub btJobOperation_Click(sender As Object, e As EventArgs) Handles btJobOperation.Click
        RunJob()
End Sub
Thanks for your help !

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 26 Apr 2022, 08:11 AM

Hi Vincent,

Please make sure that you're not using both RadAjaxManager and RadAjaxPanel to enable AJAX requests for Controls. We have discussed this in the Controls Wrapped in AjaxPanel and Added to AjaxManager Settings article.

You must choose one or the other, but not both. Please give this a try and let me know if you still experience problems.

Regards,
Attila Antal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Ajax AjaxLoadingPanel
Asked by
Vincent
Top achievements
Rank 1
Iron
Iron
Answers by
Attila Antal
Telerik team
Share this question
or