RR-Fireball RR-Fireball - 1 month ago 14
C# Question

How to properly Set RadGridView.IsBusy while grouping

In my scenario Telerik Rad gridview becomes unresponsible for a couple of seconds while grouping certain amount of data. All I want to do is to show some kind of loading indicator for this period of time. I tried to simple leverage OnGrouping, OnGrouped events to set IsBusy like this:

OnGrouping(){ gridView.IsBusy = true;}
OnGrouped(){ gridView.IsBusy = false;}


But it does not work. It looks like Telerik GridView performs all grouping in UI thread without any chance for 'IsBusy = true' being proceed before grouping finishes.

Anybody knows to to achieve that?
Or more generally how to force layout update during 'OnGrouping' event?

Thanks in advance

Answer

I reckon that you do not have any option. UIElement, like RadGridView, must be created on UI so the way out, by creating it in background thread and then assign it to UI thread, does not come into play. In ordinary grouping it is made on CollectionView so I guess it may be carried out simultaneously but as you said in your case UIelement is responsible for it.

Comments