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

[Solved] Help showing a progress indicator until grid displays?

2 Answers 150 Views
Grid for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Roger
Top achievements
Rank 1
Roger asked on 14 May 2013, 04:43 PM
I am using a RadDataGrid to show a grid of order details. This grid uses a few converters for DataGridTemplateColumn's which show images depending on if each line item is in stock, etc.

I have a standard loading overlay I show on all the screens in the Win8 app while data is loading. I am trying to show this loading indicator until the RadDataGrid has successfully drawn itself for the first time. I have tried to do this like so:

OrderGrid.DataBindingComplete += (s, e) =>
{
  App.ViewModel.IsBusy = false;
};

Unfortunately the DataBindingComplete event fires well before the grid ever appears. Is there any way to know when the grid has successfully displayed so that I can show a loading indicator until then? As the app stands now the loading screen goes away, and the page has a huge blank area where the grid goes until several seconds later when the grid renders for the first time.

Thanks for your help!

2 Answers, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 15 May 2013, 04:20 PM
Hi Roger,

Thank you for contacting us.

Yes, it is possible to track when the RadDataGrid is displayed through the RadDataGrid.LayoutUpdated event. In this specific scenario,you can register the LayoutUpdated event in the DataBindingComplete handler. Thus, you can execute the desired action in the LayoutUpdated handler(immediately after the RadDataGrid appears) and also unregister the same event.

I hope this helps. Let me know if you need further assistance.


Greetings,
Ivaylo Gergov
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Roger
Top achievements
Rank 1
answered on 16 May 2013, 01:50 PM
Thanks, worked great!
Tags
Grid for XAML
Asked by
Roger
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Roger
Top achievements
Rank 1
Share this question
or