Syncfusion.SfDataGrid.XForms Namespace > SfDataGrid Class : PullToRefreshCommand Property

PullToRefreshCommand Property (SfDataGrid)

Gets or sets the command to be executed when performing the pulling operation to refresh the grid. This command will be fired upon performing the pulling operation for doing the refreshing operation.
public ICommand PullToRefreshCommand {get; set;}

Property Value

The command to be executed when PullToRefresh action is performed.
SfDataGrid provides an option to refresh it when performing the pulling action. PullToRefreshCommand will be fired to refresh (add, delete or modify the underlying data) the grid. A busy indicator will be displayed to denote the pulling and refreshing operation.
dataGrid.AllowPullToRefresh = true;
dataGrid.PullToRefreshCommand = 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;

Syncfusion.SfDataGrid.XForms: 17.2451.0.34

See Also