We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Event draw items completed

Thread ID:

Created:

Updated:

Platform:

Replies:

145529 Jun 26,2019 06:44 PM UTC Jun 28,2019 10:25 AM UTC Xamarin.Forms 3
loading
Tags: SfDataGrid
RAFAEL FELIPE SACOMANI
Asked On June 26, 2019 06:44 PM UTC

Hi, there any event handler that is fired when the datasource are completed or items is drawed in SFDataGrid in Xamarin.Forms?

ex: 

Grid.ItemsAddedCompleted +=... 

or 

Grid.EndDrawItemsCompleted +=...




Subburaj Pandian Veluchamy [Syncfusion]
Replied On June 27, 2019 12:57 PM UTC

Hi Rafael, 
  
Thank you contacting Syncfusion support. 
  
You can use ItemsSourceChanged event which fires whenever the ItemsSource has been changed. Please refer our User Guide documentation regarding the same, 
 
  
Please refer the following code snippet, 
  
  
public MainPage() 
{ 
    InitializeComponent();                                             
    dataGrid.ItemsSourceChanged += DataGrid_ItemsSourceChanged; 
} 
  
private void DataGrid_ItemsSourceChanged(object sender, GridItemsSourceChangedEventArgs e) 
{ 
    //// You can do required process here. 
}  
  
We have prepared a sample based on your requirement and you can download it from the below link. 
 
  
We hope this helps. Please let us know, if you would require any further assistance. 
  
Regards,
Subburaj Pandian V  


RAFAEL FELIPE SACOMANI
Replied On June 27, 2019 05:14 PM UTC

this event is fired when start the datasource changed or end? 

i ask this because i want to use a loading screen and hide this only when the grid are fully loaded

Subburaj Pandian Veluchamy [Syncfusion]
Replied On June 28, 2019 10:25 AM UTC

Hi Rafael, 
  
Thank you for the update. 
  
Your requirement to load a loading indicator while SfDataGrid has been loaded, can be achieved by loading a SfBusyIndicator in the SfDataGrid.GridLoaded event. 
   
Please refer the following code for the same, 
  
 [C#] 
public partial class MainPage : ContentPage 
    SfBusyIndicator indicator; 
    public MainPage() 
    { 
        InitializeComponent(); 
        indicator = new SfBusyIndicator(); 
                              dataGrid.GridLoaded += DataGrid_GridLoaded;             
    } 
  
               private async void DataGrid_GridLoaded(object sender, GridLoadedEventArgs e) 
               { 
                              //// customize based on the requirement.        
                              indicator.IsBusy = true; 
                              indicator.IsVisible = true; 
                              indicator.AnimationType = AnimationTypes.SlicedCircle; 
                              grid.Children.Add(indicator); 
                              await Task.Delay(2000); 
                              indicator.IsBusy = false; 
                              indicator.IsVisible = false; 
               }              
}   
 
  
You can refer our User Guide documentation regarding the same by the following link, 
 
 
We have prepared a sample based on your requirement and you can download it from the below link, 
 
  
Regards,
Subburaj Pandian V  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon