Problems with busy indicators

4 posts, 0 answers
  1. VaL
    VaL avatar
    30 posts
    Member since:
    Oct 2017

    Posted 21 Dec 2018 Link to this post

    Hi, I can not make busy indicators work.

    I call the radVirtualGrid1.MasterViewInfo.IsWaiting = true before (and false after) i load a huge amount of data and write on the virtual grid with the CellValueNeeded event but i can't see the busy indicator bar.

    Same thing when I call radVirtualGrid1.MasterViewInfo.StartRowWaiting(indexRow) inside the RowExpanding event and radVirtualGrid1.MasterViewInfo.StopRowWaiting(indexRow) inside the RowExpanded event.

    The indicator doesn't work..

    I partially resolved with the call to Application.DoEvents() immediately after the above methods. I can see the bar but they aren't animated!

    Thanks in advance

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3903 posts

    Posted 24 Dec 2018 Link to this post

    Hello, Valerio,     

    According to the provided information, it seems that the UI thread is busy. Are you performing a long-lasting operation which may be blocking the busy indicators? Consider executing the heavy operations in a BackgroundWorker. Thus, the UI thread won't be blocked. The following article is quite useful on this topic: https://docs.telerik.com/devtools/winforms/controls/track-and-status-controls/waitingbar/using-waitingbar-with-a-background-worker

    The Demo application >> Virtual Grid >> Web service example demonstrates how to use the busy indicators properly. It 

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Happy holidays 
     
    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. VaL
    VaL avatar
    30 posts
    Member since:
    Oct 2017

    Posted 03 Jan 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hi Dess, ok i have used a BackgroundWorker and the main busy indicator now works! Thanks.

    But I have some problems with the StartRowWaiting() method. I use a timer like the telerik example but i would like to load my data inside the RowExpanding method.. In this case the animation stop to work. You can simulate the loading with a Thread.Sleep

    01.private void radVirtualGrid1_RowExpanding(object sender, Telerik.WinControls.UI.VirtualGridRowExpandingEventArgs e)
    02.        {
    03.            if (viewInfoToExpand == null)
    04.            {
    05.                e.Cancel = true;
    06.                e.ViewInfo.StartRowWaiting(e.RowIndex);
    07.                viewInfoToExpand = e.ViewInfo;
    08.                rowToExpand = e.RowIndex;
    09.                expandTimer.Start();
    10.            }
    11.            else
    12.            {
    13.                if (rowToExpand != e.RowIndex)
    14.                {
    15.                    e.Cancel = true;
    16.                }
    17.                else
    18.                {
    19. 
    20.                    e.ChildViewInfo.ColumnCount = 4;
    21.                    e.ChildViewInfo.RowCount = 5;
    22.                    e.ChildViewInfo.EnablePaging = true;
    23.                    // In my software implementation, here invoke an event that load huge amount of data
    24.                    System.Threading.Thread.Sleep(10000);
    25.                }
    26.            }
    27.        }
  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3903 posts

    Posted 07 Jan 2019 Link to this post

    Hello, Valerio,  
     
    Once a time-consuming operation is started, RadVirtualGrid does not move its indicators and literally freezes. Such cases occur when the long-running operation is executed on the same thread as the virtual grid: the primary UI Thread. The operation does not allow the form to update its UI and as a result the control does not perform any waiting animation. One obvious solution is to start the time-consuming operation in a new thread. You can refer to the following help article which demonstrates a sample approach: https://docs.telerik.com/devtools/winforms/controls/track-and-status-controls/waitingbar/using-waitingbar-with-a-background-worker

    Should you have further questions please let me know.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top