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

SfListView dont support header view? or pull to refresh?

Is it possible to use a view header in SfListView? If so, how should I proceed?
Have the same doubt about push to refresh.

18 Replies

DB Dinesh Babu Yadav Syncfusion Team December 14, 2016 02:12 PM UTC

Hi Edgar,  
  
Thanks for using Syncfusion product.  
  
Requirement 1:  
You can achieve your requirement “Defining Header to the SfListView”  by using HeaderTemplate property.  
  
Code example[XAML]:  
  
xmlns:listView="clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms"  
  
<listView:SfListView x:Name="listView" ItemsSource="{Binding contactsinfo}" >  
    <listView:SfListView.HeaderTemplate>  
          <DataTemplate>  
             <Label Text="Customer Details" FontSize="18" FontAttributes="Bold" TextColor="Black"/>  
          </DataTemplate>  
        </listView:SfListView.HeaderTemplate>   
</listView:SfListView>  
  
  
In SfListView UG documentation, we have mentioned the examples in C# and XAML to define the header item. Please refer the below documentation for more details  
 
For your reference, we have attached the sample also. Please find the sample link below,  
  
Requirement 2:  
Currently SfListView do not have support for PullToRefresh. Hence we have considered this as feature request. We are implementing the pull-to-refresh feature and it will be available in our upcoming 2017 volume 1 release which is scheduled to be rolled out by February 2017.   
   
Regards,  
Dinesh Babu Yadav  



EP Edgar Pedro Augusto Toledo December 14, 2016 03:56 PM UTC

thank you so much! Your information was very useful.


AP Ashwini Paranthaman Syncfusion Team December 15, 2016 05:50 AM UTC

Hi Edgar, 
Thank you for the update. 
We are glad that your requirement has been met. 
Regards, 
Ashwini P. 



PG Patric Genfer February 20, 2017 10:52 PM UTC

I just updated SfListView to version 15.1.0.33 (2017 Volume 1), but I was not able to find any PullToRefresh feature in the SfListView.
Is this feature already available in the new version and if yes, could you give any hint how to use it?

Thank you in advance for your help.



DB Dinesh Babu Yadav Syncfusion Team February 21, 2017 12:21 PM UTC

Hi Patric,  
  
Sorry for the inconvenience caused.  
  
Due to other high priority tasks, we are unable to complete the reported feature “Support for PullToRefresh in SfListView” in the Essential Studio Volume 1 main release. However, the reported feature will be included in our upcoming main release.  
  
Please let us know if you require further assistance.  
  
Regards,  
Dinesh Babu Yadav 



VS Valeriano Simeone May 23, 2017 09:25 PM UTC

Hi,
I've updated to 15.2.0.40 but I was not able to find any PullToRefresh feature in the SfListView.

News?



DB Dinesh Babu Yadav Syncfusion Team May 24, 2017 11:33 AM UTC

Hi Valeriano, 
 
Sorry for the inconvenience caused. 
 
We regret to inform you that we have faced the Xamarin framework hurdles while implementing the reported feature “Support for PullToRefresh in SfListView”. So, we are unable to include the feature in our 2017 Volume 2 main release and we will assure you that the reported feature will be included in our upcoming 2017 Volume 2 SP 1 release which is scheduled to rolled out by end of this month. We will appreciate your patience until then.   
 
Regards, 
Dinesh Babu Yadav 
 



HJ Hetal Jariwala July 25, 2017 03:35 PM UTC

Is this feature implemented?



DB Dinesh Babu Yadav Syncfusion Team July 26, 2017 12:47 PM UTC

Hi Hetal, 
 
Apologies for the delay caused. 
 
We are implementing the reported feature “Support for PullToRefresh in SfListView” at our end and we will assure you that it will be included in our upcoming 2017 Volume 3 main release which is scheduled to be rolled out by first week of August, 2017. We will let you know once the release has been rolled out and we will appreciate your patience until then. 
 
Regards, 
Dinesh Babu Yadav 
 



LQ Lorenzo Quinto August 8, 2017 01:14 PM UTC

How to implement pullToRefresh?



MK Muthu Kumaran Gnanavinayagam Syncfusion Team August 10, 2017 02:16 AM UTC

Hi Lorenzo, 
  
We are glad to announce that our Essential Studio Volume 3, 2017 (v15.3.0.26) is rolled out with the support for  ‘SfPullToRefresh integration into the SfListView control’ and is available for download under the following link.   
   
                                                
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.   
  
You need to add the SfListView as first children in PullableContent of SfPullToRefresh. Please refer the below code examples. 
 
Code Example[XAML]: 
<pulltoRefresh:SfPullToRefresh x:Name="pullToRefresh" 
                               ProgressBackgroundColor="#428BCA" RefreshContentHeight="50"  
                               RefreshContentWidth="50" TransitionMode="Push" IsRefreshing="False"> 
  <pulltoRefresh:SfPullToRefresh.PullableContent> 
    <syncfusion:SfListView x:Name="listView" ItemSize="120" 
                           SelectionMode="None"> 
    </syncfusion:SfListView> 
  </pulltoRefresh:SfPullToRefresh.PullableContent> 
</pulltoRefresh:SfPullToRefresh> 
 
By using the Refreshing event of SfPullToRefresh, you can add the data at runtime in SfListView while pulling. Please refer the below code example, 
 
Code Example[C#] 
pullToRefresh.Refreshing += PullToRefresh_Refreshing; 
 
private async void PullToRefresh_Refreshing(object sender, EventArgs args) 
{ 
  pullToRefresh.IsRefreshing = true; 
  await Task.Delay(2000); 
 
  for (int i = 0; i < 3; i++) 
  { 
    var blogsCount = pulltoRefreshViewModel.BlogsInfo.Count; 
    var item = new ListViewBlogsInfo() 
    { 
      BlogTitle = pulltoRefreshViewModel.BlogsTitle[blogsTitleCount - blogsCount], 
      BlogAuthor = pulltoRefreshViewModel.BlogsAuthers[blogsAuthorCount - blogsCount], 
      BlogCategory = pulltoRefreshViewModel.BlogsCategory[blogsCategoryCount - blogsCount], 
      ReadMoreContent = pulltoRefreshViewModel.BlogsReadMoreInfo[blogsReadMoreCount - blogsCount], 
    }; 
    pulltoRefreshViewModel.BlogsInfo.Insert(0, item); 
  } 
  pullToRefresh.IsRefreshing = false; 
} 
 
  
We will update the UG documentation for the same in our UG shortly. 
  
Regards, 
G.Muthu Kumaran.


DB Dinesh Babu Yadav Syncfusion Team August 19, 2017 07:06 AM UTC

Hi Lorenzo, 
 
Thanks for the patience. 
 
We have updated “Working with PullToRefresh in SfListView” in our UG documentation and please refer the following link for more information.    
    
 
Regards, 
Dinesh Babu Yadav 



FL FLecointe August 24, 2017 08:45 AM UTC

Using the pull to refresh I found myself confronted with a problem which I find the solution, I make it in the event that people are confronted:

My page has a "header" area containing action buttons for the entire list, then my sflistview. In order to position them on my page, I use a grid.

By adding the pushtorefresh, my sflistview as overflowed on my header and the pulltorefresh in itself did not work; The problem comes from the fact that the Grid.Row is defined in the sflistview, it must be moved in the definition of the pulltorefresh (the 1st) so that the grid position works and that the refresh also.



DB Dinesh Babu Yadav Syncfusion Team August 25, 2017 05:12 AM UTC

Hi FLecointe, 
 
Thank you for contacting Syncfusion support. 
 
We would like to let you know that in SfListView, we have a limitation that you need to load the SfListView as first children of PullableContent for the PulltoRefresh control to enable it which we have included in our UG documentation below. 
 
 
If your requirement is to add the header view to the SfListView where you can perform further process to it, then you can use HeaderTemplate property and define it as IsStickyHeader as true which sticks the header to the view even while scrolling the listview. Also, you can define the scrollable header by defining  the IsStickyHeader as false. Please refer the following documentation for more information. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 



HJ Hetal Jariwala August 28, 2017 08:42 PM UTC

I have implemented the above mentioned method for Pull to Refresh functionality. But it's not calling refresh method



DB Dinesh Babu Yadav Syncfusion Team August 29, 2017 12:17 PM UTC

Hi Hetal, 
 
Sorry for the inconvenience. 
 
We have checked the reported issue “Refreshing method is not triggered in SfPullToRefresh control” with different scenarios such as pulling is performed by gesture action with and without header element etc.., But, we are unable to reproduce the reported issue at our end. And we suspect that the issue arises due to SfPullToRefreshRenderer might not be initialized in renderer projects. And, you may have not add the assemblies needed to initialize the SfPullToRefresh in each renderer project. So, we recommend you to refer the following UG documentation links to initialize the SfPullToRefresh renderer in each platform to resolve the issue at the sample level.   
 
 
Also, we would like to let you know that if the pull-to-refresh is performed by programmatically, then Refreshing method won’t be triggered and this is the actual behavior. However, it can be achieved by using StartRefreshing and EndRefreshing methods. Since, the StartRefreshing method is used to refresh the content without gesture action in PullableContent and Progress indicator will be shown. The EndRefreshing method is used to end the progress animation of SfPullToRefresh.     
 
We have prepared the sample in which the PullToRefresh is initiated both by button click event using StartRefreshing method and by gesture action. You can download the sample from the below link.    
 
Could you please check with the above sample?. If the issue still persist at your end, if possible please modify the above sample to replicate the issue and revert us with the replication procedure. Also, could you please share and check with the below information’s at your end. So, that we could able to analyze the issue better and update you an appropriate solution.     
 
  • Have you loaded the SfListView control as first child element to the PullableContent? If no, please share in which layout does the issue replicates and please share the replication procedure too?
  • Could you please share the application scenario in which the reported issue occurs?
  • Could you please share the Xamarin Forms version?. We have ensured in Xamarin Forms v2.3.3.180.?
  • Could you please share that whether the issue replicates only in specific platform such as only in Android platform or in others too?
 
Please let us know if you require further assistance.    
 
Regards, 
Dinesh Babu Yadav 
 



HJ Hetal Jariwala August 31, 2017 04:53 PM UTC

Yes it's working perfect now.



DB Dinesh Babu Yadav Syncfusion Team September 1, 2017 02:20 AM UTC

Hi Hetal, 
 
Thanks for the update. 
 
Regards, 
Dinesh Babu Yadav 
 


Loader.
Up arrow icon