Hi Eray,
Thank you for contacting Syncfusion Support.
In Xamarin.Forms, there is an in-build class called Command which you can use it. However, in Xamarin.iOS there is no such class and you need to write a command implementing from the ICommand interface in your sample in order to use commands in Xamarin.iOS.
Please refer the below code example for the Command class implementation.
//Enable PullToRefresh in SfDatagrid
dataGrid.AllowPullToRefresh = true;
dataGrid.PullToRefreshCommand = new Command (ExecuteCommand);
//Command.cs
public class Command : ICommand
{
private Action execute;
private bool canExecute = true;
public event EventHandler CanExecuteChanged;
public Command(Action action)
{
execute = action;
}
public bool CanExecute(object parameter)
{
return canExecute;
}
public void Execute(object parameter)
{
changeCanExecute(true);
execute.Invoke();
}
private void changeCanExecute(bool canExecute)
{
this.canExecute = canExecute;
if (CanExecuteChanged != null)
CanExecuteChanged(this, new EventArgs());
}
} |
We have also included the code in our UG as well and it will be refreshed in live shortly. You can refer it below UG link,
Regards,
Divakar.