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

[Solved] RowDetailsVisibilityChanged and Details Processing Indicator

2 Answers 268 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paurav
Top achievements
Rank 1
Paurav asked on 16 Aug 2010, 04:52 PM
I am using RadGridView that shows details via RowDetailsTemplate when row is selected. I'm loading a view into the details template dynamically in RowDetailsVisibilityChanged event. This page when initialized loads some data that takes a few seconds to load. What's happening is there is a pause when the row is clicked until the view loads all the data in the background and then the view is shown. What I'm trying to do is separate the loading of view and Initializing the view. Therefore the view can show the processing indicator so the user know that click occurred properly. Is there a way to achieve this? Following is the code in my DetailsVisibilityChanged event:

private void DataGrid_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
{
    var contentControl = (e.DetailsElement as ContentControl);
    if (contentControl.Content == null)
    {
        var ti = e.Row.DataContext as someObject;
        IPresentationModelBase pmBase = Model.InstantiateItemDetailsPM();
        IView viewObj = pmBase.ViewObj;
 
        //This should show the processing indicator
        contentControl.Content = viewObj;
        //Which processing, initializing should occur.
        Model.InitializeItemDetailsPM(pmBase, ti);
    }
 
}

Thanks

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 19 Aug 2010, 01:16 PM
Hello Paurav,

 
You can use RadBusyIndicator and to initialize it on the LoadingRowDetails or RowDetailsVisibilityChanged events of the grid. I am sending you a sample project illustrating how to implement a busy indicator on the LoadingRowDetails event. 
You can find online examples about the RadBusyIndicator in our online demos.

Best wishes,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Paurav
Top achievements
Rank 1
answered on 26 Aug 2010, 04:51 PM
Thanks Maya.
Tags
GridView
Asked by
Paurav
Top achievements
Rank 1
Answers by
Maya
Telerik team
Paurav
Top achievements
Rank 1
Share this question
or