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. Image for the cookie policy date

SfDataGrid PullToRefreshCommand doesnt work setting into XAML


When I defined PullToRefreshCommand in the xaml, It does nothing for me

<sfgrid:SfDataGrid  ScrollingMode="Pixel"  x:Name="grid" AllowPullToRefresh="True"
                              PullToRefreshCommand="ExecutePullToRefreshCommand"

I just into the constructor of my page  as below and it works. Is it a bug or I do something wrong?

    grid.AllowPullToRefresh = true;
      grid.PullToRefreshCommand = new Command(ExecutePullToRefreshCommand);

3 Replies

AN Ashok N Syncfusion Team February 15, 2017 06:51 AM UTC

Hi Emil, 
 
Thanks for contacting Syncfusion support. 
 
We have checked your query and SfDataGrid.PullToRefreshCommand is ICommand type. For ICommand type we have to set the method call using Command class (Same like Button.Command). We request you to set the ExecutePullToRefreshCommand method from code behind for enable the PullToRefresh in SfDataGrid. 
 
Regards, 
Ashok  



EM Emil February 15, 2017 11:53 AM UTC

Ok. I tried today using a command binding in my viewmodel with Xaml and binding works fine. thanks


AN Ashok N Syncfusion Team February 16, 2017 09:32 AM UTC

Hi Emil, 
 
Thanks for your reply. Please let us know if you require further assistance on this. 
 
Regards, 
Ashok 


Loader.
Up arrow icon