Navigate to page with data grid takes some time

Hi, 

I just wanted to know, how to best use the sfDataGrid. 
So far I instantiate and configure the whole data grid in the OnCreateView method, which (in general) works fine. 

The problem is, that the UI gets displays only after the whole OnCeateView method has finished and returned the view. 

This leads to the following effect: Let's assume we have 2 pages ... 
Page 1 with a button. 
Page 2 with the sfDataGrid.

When I press the button on page 1, the app navigates to page 2. Since page 2 needs some time to execute the OnCreateView method (and load the data grid), it takes some time (not much, but maybe 1 or 2 seconds) after I clicked the button and the moment the page 2 is shown. (So the user stays on page 1 and nothing happens, until page 2 with the data grid is shown ... / Just for clarification: the data, which will be displayed by the data grid is loaded async and is not the problem ... .)

Unfortunately, I am not able to show a progress bar in the meantime ... 
(The loading time in generally is no problem, I just want to tell the user, what is happening ...)

Do you have an idea, how I could solve this?

Any advice appreciated!

Best,
Michael



3 Replies

VR Vigneshkumar Ramasamy Syncfusion Team October 4, 2018 07:04 AM UTC

Hi Michael 
 
Thanks for contacting Syncfusion support. 
 
Query” I am not able to show a progress bar in the meantime” 
 
We have checked your query and your requirement of showing progress can be achieved by using SfBusyIndicator control. Please refere the below KB artice for using SfBusyIndicator with SfDataGrid control. 
 
 
Aslo SfDataGrid allows loading large amounts of data in less time by setting SfDataGrid.EnableDataVirtualization property to true. Please find the below UG link for the same. 
 
 
Please let us know if this helpful. 
 
Regards 
Vigneshkumar R 



MI Michael October 15, 2018 04:45 PM UTC

Hi, 

Thanks for your answer. 

At the same page I have another request.
I want to display 2 DataGrids on a page. (Based on a user's preferences set in settings.)

When I start the application, the 1st DataGrid which gets shown is always nicely displayed. However, if I then go into the settings and select the 2nd DataGrid to be displayed, the leftmost column suddenly becomes very wide, which looks very ugly. (Basically, the complete partition of the columns is no longer correct.)

Important: If I display the 2nd DataGrid first, this will be displayed correctly, and later the 1st DataGrid will be displayed in a strange way.
(The DataGrids did not differ in the data source, only in the columns shown.)

Maybe it is possible for you to provide me with an example with 2 DataGrids on the same page?

Best, 
Michael



VR Vigneshkumar Ramasamy Syncfusion Team October 16, 2018 09:39 AM UTC

Hi Michael,  
  
Thanks for your update.  
  
We have checked your query and try to reproduce the reported issue. But the issue does not reproduce from our side. We have prepared the sample based on your requirement “Display 2 DataGrids on a page” and attached for your reference. You can download the same from the below link. In case, if the issue still exists in your side. Revert us with clear replication procedure.   
  
  
Please let us know if this helpful. 
 
Regards,  
Vigneshkumar R 


Loader.
Up arrow icon