Crash on calling notifydatasetchanged

8 posts, 0 answers
  1. Nisha
    Nisha avatar
    5 posts
    Member since:
    Mar 2017

    Posted 17 Apr Link to this post

    On the click of menu icon my arraylists gets populated and I call adapter.notifydatasetchanged()

    Arraylist count keeps on varying. When I launch my application arraylist count is 1, and on the tap of button arraylist is changed and now its count is 4, but on the call of notifydatasetchanged app crashes giving error (IndexOutOf BoundException : Index1, seize 1).

    Kindly suggest a solution on priority.

     

  2. Nisha
    Nisha avatar
    5 posts
    Member since:
    Mar 2017

    Posted 17 Apr in reply to Nisha Link to this post

    I am facing the above issue in native xamarin android
  3. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1236 posts

    Posted 20 Apr Link to this post

    Hi Nisha,

    Thank you for contacting us on that matter. We would really like to assist you on your way. Could you please provide a project demonstrating the issue you encounter? It is difficult to understand the exact implementation based on the provided explanation. Once you do this we will be able to better understand your setup and assist you on your way.

    Regards,
    Pavel R. Pavlov
    Telerik by Progress
    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
  4. Nisha
    Nisha avatar
    5 posts
    Member since:
    Mar 2017

    Posted 16 May Link to this post

    Following is the link of the project:

    https://github.com/dipankar2308/TelerikListViewSample

    In this the (Buckets_CollectionChanged) on MainActivity crashes when listview count changes.

    With the following line, crash doesn't happen but is it a correct way to do ? because the list that I am using is ObservableCollection and the collectionchange method is called each time an item is added or deleted.

    mSampleAdapter.Items = mViewModel.Buckets;

     

  5. Tsvyatko
    Admin
    Tsvyatko avatar
    858 posts

    Posted 19 May Link to this post

    Hi Nisha,

    Thank you for contacting us! I can confirm that we were able to reproduce the issue from our side. We will dig deeper and make sure to resolve the issue in on of our future releases.

    On a side note, can you elaborate why the explicit call of notifydatachanged is required. Basically the control can handle changes in the items source and updates its view accordingly.

    Regards,
    Tsvyatko
    Telerik by Progress
    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
  6. Nisha
    Nisha avatar
    5 posts
    Member since:
    Mar 2017

    Posted 01 Jun in reply to Tsvyatko Link to this post

    We have to call notifydatachanged otherwise data is not getting updated in the listview.

    Even in other scenarios in my project when only one item of the listview changes still the list doesnt refresh without calling notifydatasetchanged

     

    Please let me know if there is any solution for the same.

  7. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    501 posts

    Posted 05 Jun Link to this post

    Hi Nisha,

    Thank you for the sample provided. We will have a more detailed look at the behavior and update you once we have more information.

    Regards,
    Stefan Nenchev
    Progress Telerik
    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
  8. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    501 posts

    Posted 06 Jun Link to this post

    Hello Nisha,

    We have investigated the behavior and can confirm that it is a bug in the native implementation of the RadListView. It is logged in our internal system and you can track its progress on the following link from our Ideas & Feedback Portal - ListView: Control not updating items on NotifyDataSetChanged when bound to ObservableCollection. I suggest you subscribe to the item by following it in order to receive further notifications regarding its development. I have also added some points to your account for reporting the issue.

    Regards,
    Stefan Nenchev
    Progress Telerik
    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
Back to Top