menu

Xamarin.iOS

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PullToRefreshView - Xamarin.iOS API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PullToRefreshView

    Represents a customized view that loads data when an end-user pulls the grid down to refresh.

    Inheritance
    System.Object
    PullToRefreshView
    Namespace: Syncfusion.SfDataGrid
    Assembly: Syncfusion.SfDataGrid.iOS.dll
    Syntax
    public class PullToRefreshView : UIRefreshControl

    Constructors

    PullToRefreshView()

    Initializes a new instance of the PullToRefreshView class.

    Declaration
    public PullToRefreshView()

    Properties

    IsBusy

    Gets or sets a value indicating whether the grid is busy in refreshing the underlying data by executing the RefreshCommand.

    Declaration
    public bool IsBusy { get; set; }
    Property Value
    Type Description
    System.Boolean

    The boolean value indicating whether the grid is busy in refreshing the underlying data.

    Remarks

    The pull to refresh view will be in busy state, in the mean time pull to refresh command is executed, Refer the below code example in which the IsBusy state is set as true before executing the RefreshCommand and set as false, once the command is executed.

    The busy state of the pull to refresh view can also be tracked by the IsBusy property.

    Examples
    dataGrid.AllowPullToRefresh = true;
    dataGrid.PullToRefreshView.RefreshCommand = new Command(ExecutePullToRefreshCommand);
    
    private async void ExecutePullToRefreshCommand()
    {
       dataGrid.PullToRefreshView.IsBusy = true;
       await Task.Delay(new TimeSpan(0, 0, 5));
       viewModel.ItemsSourceRefresh ();
       dataGrid.PullToRefreshView.IsBusy = false;
    }
    
    //Command.cs
    public class Command : ICommand
    {
    
    }
    See Also
    IsBusy

    RefreshCommand

    Gets or sets the command to be executed when performing the pulling operation to refresh the grid. You must set this property to an System.Windows.Input.ICommand and the property to true to enable pulling operation in SfDataGrid. This command will be fired upon performing the pulling operation for doing the refreshing operation.

    Declaration
    public ICommand RefreshCommand { get; set; }
    Property Value
    Type Description
    System.Windows.Input.ICommand

    The command to be executed when PullToRefresh action is performed.

    Remarks

    SfDataGrid provides an option to refresh it when performing the pulling action. RefreshCommand will be fired to refresh (add, delete or modify the underlying data) the grid. A busy indicator will be displayed to denote the refreshing operation.

    The pull to refresh command can also be set using PullToRefreshCommand property.

    Examples
    dataGrid.AllowPullToRefresh = true;
    dataGrid.PullToRefreshView.RefreshCommand = new Command(ExecutePullToRefreshCommand);
    
    private async void ExecutePullToRefreshCommand()
    {
       this.dataGrid.IsBusy = true;
       await Task.Delay(new TimeSpan(0, 0, 5));
       viewModel.ItemsSourceRefresh ();
       this.dataGrid.IsBusy = false;
    }
    
    //Command.cs
    public class Command : ICommand
    {
    
    }
    See Also
    IsBusy

    Methods

    Dispose(Boolean)

    Releases the unmanaged resources used by the component and optionally releases the managed resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    if true - release both managed and unmanaged resources; if false - release only unmanaged resources.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved