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

Problems with busy indicators

3 Answers 31 Views
VirtualGrid
This is a migrated thread and some comments may be shown as answers.
VaL
Top achievements
Rank 1
VaL asked on 21 Dec 2018, 10:25 AM

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

 

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Dec 2018, 12:12 PM
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.
0
VaL
Top achievements
Rank 1
answered on 03 Jan 2019, 01:22 PM

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.        }
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Jan 2019, 09:19 AM
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.
Tags
VirtualGrid
Asked by
VaL
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
VaL
Top achievements
Rank 1
Share this question
or