Radprogress bar not showing on long page executions

5 posts, 0 answers
  1. John
    John avatar
    22 posts
    Member since:
    Jan 2011

    Posted 23 May Link to this post

    I am trying to use the RadProgressArea to show a progress bar for processing 100,000+ records. 

    It worked fine in my sample application but when deploying it failed to show.  I narrowed down the problem to tasks that occur prior to this progress bar loop that take upwards of 12 seconds.  Then after some testing I found that if I manually add a .Sleep() to the thread for anything more than 5 seconds (to simulate the delay) it would cause the RadProgressArea to not show at all.  Basically if I take the Telerik example and simply add a 6s delay in front of it then it never works.

    Am I missing something obvious here?  Thank you in advance for my sanity.

    System.Threading.Thread.Sleep(5000) ' ANYTHING 5s OR HIGHER MAKES PROGRESS BAR NEVER SHOW
     
    ' initialize variables
    Dim progress As RadProgressContext = RadProgressContext.Current
     
    ' loop through records
    For i As Integer = 0 To TotalRecords - 1
        ' update progress bar
        UpdateProgressBar(progress, dtStarted, TotalRecords, i)
     
        ' SOME WORK STUFF GOES HERE
    Next

  2. John
    John avatar
    22 posts
    Member since:
    Jan 2011

    Posted 24 May in reply to John Link to this post

    Just a bump to see if I can get an answer on this for a time sensitive project. 

    So ignoring the previous details, if I simply take the sample Telerik example at http://demos.telerik.com/aspnet-ajax/progressarea/ and add a 6 second delay *before* the logic takes place then the progress window never shows up.

    Any help is greatly appreciated

    Protected Sub buttonSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles buttonSubmit.Click
        UpdateProgressContext()
    End Sub
     
    Private Sub UpdateProgressContext()
        Const Total As Integer = 100
     
        'Stall the current thread for 6 seconds (THIS BREAKS THE PROCESS, NO WINDOW SHOWS UP)
        System.Threading.Thread.Sleep(6000)
     
        Dim progress As RadProgressContext = RadProgressContext.Current
        progress.Speed = "N/A"
     
        For i As Integer = 0 To Total - 1
            progress.PrimaryTotal = 1
            progress.PrimaryValue = 1
            progress.PrimaryPercent = 100
            progress.SecondaryTotal = Total
            progress.SecondaryValue = i
            progress.SecondaryPercent = i
            progress.CurrentOperationText = "Step " & i.ToString()
            progress.TimeEstimated = (Total - i) * 100
     
            'Stall the current thread for 0.1 seconds
            System.Threading.Thread.Sleep(100)
        Next
    End Sub

     

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 26 May Link to this post

    Hi John,

    I have replied in the support ticket that you have opened.

    Regards,
    Hristo Valyavicharski
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  5. Brian
    Brian avatar
    1 posts
    Member since:
    Jun 2015

    Posted 11 Oct in reply to Hristo Valyavicharski Link to this post

    Would it be possible to post the answer for anyone else having similar issues?
  6. Peter Milchev
    Admin
    Peter Milchev avatar
    135 posts

    Posted 14 Oct Link to this post

    Hello Brian,

    The problem is caused by the following bug: ProgressArea does not show if progress monitoring is delayed with 5 or more seconds. You could follow the item and this way you would know when the bug is fixed, as this will be reflected in the item's status.

    Regards,
    Peter Milchev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017