Initializing an empty list doesn't have pull-to-refresh enabled

2 posts, 0 answers
  1. Eric
    Eric avatar
    16 posts
    Member since:
    May 2014

    Posted 02 Sep 2015 Link to this post


    When I initialize a TKListView in my Xamarin iOS view, I check if there are any items to display. If the list is empty, I'll show a label to the user "no data available":


    var view = new UIView(new CGRect(0, 0, View.Bounds.Width, 200));
    backgroundStatusLabel = new UILabel(new CGRect(0, 0, View.Bounds.Width, 100));
    backgroundStatusLabel.TextColor = new UIColor(0.80f, 0.8f, 0.8f, 1);
    backgroundStatusLabel.TextAlignment = UITextAlignment.Center;
    _listView.BackgroundView = view;

    The view renders perfectly. Showing the image as seen in the attachment. But the pull-to-refresh doesn't work. I put a breakpoint in the Delegate, but it doesn't hit the DidPull event:

    public override void DidPull(TKListView listView, nfloat offset)
        listView.PullToRefreshView.Alpha = (float)Math.Min(offset / listView.PullToRefreshTreshold, 1.0f);

    But if I:

    • initialize the TKListView with at least 1 item
    • then delete that item from the TKListView
    • Show the 'No Results' message

    ...then the Pull-to-refresh works and the DidPull is hit by the debugger.

     Can someone point me in the right direction to make this pull to refresh work, even on an empty TKListView?


    Many thanks in advance

  2. Adrian
    Adrian avatar
    160 posts

    Posted 03 Sep 2015 Link to this post

    Hello Eric,

    Thank you for contacting us.

    Currently there is an issue with the pull-to-refresh functionality of TKListView when the list view is empty. The issue will be addressed in one of our future releases. You can follow its status in our feedback portal. I also update your Telerik points for reporting this issue.

    Should you need further assistance, do not hesitate to contact us.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top