- Home
- Forum
- Xamarin.Forms
- Event draw items completed
Event draw items completed
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 +=...
SIGN IN To post a reply.
3 Replies
SP
Subburaj Pandian Veluchamy
Syncfusion Team
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.
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfGridSample-655765713
We hope this helps. Please let us know, if you would require any further assistance.
Regards,
Subburaj Pandian V
Subburaj Pandian V
RF
RAFAEL FELIPE SACOMANI
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
SP
Subburaj Pandian Veluchamy
Syncfusion Team
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,
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfGridSample-583506833
Regards,
Subburaj Pandian V
Subburaj Pandian V
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
RF RAFAEL FELIPE SACOMANI
- Jun 26, 2019 06:44 PM UTC
- Jun 28, 2019 10:25 AM UTC