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

[Solved] Any way to calculated the time between data is loaded and the Grid UI is showed

1 Answer 42 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.
Minwei
Top achievements
Rank 1
Minwei asked on 16 Nov 2010, 06:52 AM
Hi,  Guys

Is there any way that we can calculate the time bwteen data is loaded (data is binded to grid) and the Grid UI is showed. Is there any event that we can catch?

Thanks
Minwei

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 16 Nov 2010, 12:37 PM
Hi Minwei,

The only such event that I could think of is LayoutUpdated. The very first LayoutUpdated event will singnal that the grid rows have been loaded. You could try something like this:

public MainWindow()
{
    InitializeComponent();
  
    this.playersGrid.ItemsSource = Player.GetPlayers();
    this.playersGrid.LayoutUpdated += new EventHandler(playersGrid_LayoutUpdated);
    this.playersGrid.DataLoaded += new EventHandler<EventArgs>(playersGrid_DataLoaded);
}
  
void playersGrid_DataLoaded(object sender, EventArgs e)
{
    // data it loaded
}
  
void playersGrid_LayoutUpdated(object sender, EventArgs e)
{
    // UI is loaded
  
    this.playersGrid.LayoutUpdated -= new EventHandler(playersGrid_LayoutUpdated);
}


Best wishes,
Milan
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
Tags
GridView
Asked by
Minwei
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or