In our WPF project, we have a UserControl with a RadGridView to display persons. We decided to use the EntityFrameworkDataSource because it is easy to implement and offers a lot of advantages.
We implement the Entity Data Source and everything is working except one thing. When we click on the Menu to call the UserControl, a delay is occuring. the UserControl takes 5~10 seconds to appear, and when it appear the RadGridView is already loaded with the data.
If i remove the lines of the DataSource, the UserControl loads fast with 2 seconds. The Gridview only has 20 itens, i'm afraid that when the data begins to grow this delay became worse, it will impact a lot for the client.
Can you help me solving this? It is hard to explain with words, if you not understand the problem let me know and i try to make a video.
Thanks!
8 Answers, 1 is accepted
I have tested how the GridView loads on our demo about EntityFrameworkDataSource. My observations are that the data was loaded quite fast on the demo.
May I ask you to make some additional tests in order to isolate the possible reasons for such a delay. What is the result if you set the ItemsSource without using the EntityFrameworkDataSource? Does it load faster? Any other relevant information would be helpful as well.
Thank you for your cooperation.
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I follow your instructions, I set the ItemSource without the EntityFrameworkDataSource. It notice that it load a little bit faster but still take a seconds to the UserControl appear.
I forget to say in the first post, We have a UserControl with RadTransitionControl that is the Container for all of the others UserControls, When a item on the menu is selected, we add the UserControl to the RadTransitionControl:
public
void
Navigate(
int
codigoModulo)
{
try
{
#region [ Pessoas ]
if
(codigoModulo == ModulosConstantes.PESSOAS_PESSOAS)
{
//TrnConteudoSistema is the RadTransitionControl
//PessoasVisao is the UserControl that is taking long time to appear.
this
.TrnConteudoSistema.Content =
new
ITS.Contatos.PessoasVisao();
}
}
catch(exception){}
}
The biggest problem is, We click on the menu, and the delay occurs even if I set the ItemsSource without the Entity DataSource. After 5 seconds the Animation occurs and the UserControls show with the data already loaded.
I was wondering if is there a way to only call the Load() when the animation already happened and the UserControl is loaded.
Thank you for that additional information.
We have tested the loading time when using RadTransitionControl as well but we were not able to notice any delays.
Would it be possible for you to isolate the problem in a simlpe application so that we could further investigate it? You can follow the guidelines in this blog post how to isolate the problem in a sample project.
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Thanks for your help. I follow the blog post, and I manage to recreate the problem in a isolated sample project. I've created the sample project with the same "structure" of the original one, and I also recreate the database with the table that the EntityFrameWork uses.
I will attach a script to create the Database and the table/View and the WPF project.
Where do I attach the file? Here? Or should I open a support ticket?
Thanks!
It would be great if you send us the demo project in a support ticket.
Regards,Didie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Thank you for your support
I'd like to say that I set the GridView DataLoadMode to Asynchronous and now the UserControl loads a faster than before.
I just have one more question, the EntityFrameworkDataSource also have the IsBusy property like DataServiceDataSource?
IsBusy="{Binding IsBusy, ElementName=PessoasDataSource}"
The load of the EntityFrameworkDataSource is synchronous and it does not have an IsBusy property.
All the best,Didie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>