This is a migrated thread and some comments may be shown as answers.

Crash on calling notifydatasetchanged

7 Answers 245 Views
ListView - Xamarin.Android
This is a migrated thread and some comments may be shown as answers.
Nisha
Top achievements
Rank 1
Nisha asked on 17 Apr 2017, 03:59 PM

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.

 

7 Answers, 1 is accepted

Sort by
0
Nisha
Top achievements
Rank 1
answered on 17 Apr 2017, 04:04 PM
I am facing the above issue in native xamarin android
0
Pavel R. Pavlov
Telerik team
answered on 20 Apr 2017, 06:40 AM
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
0
Nisha
Top achievements
Rank 1
answered on 16 May 2017, 01:26 PM

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;

 

0
Tsvyatko
Telerik team
answered on 19 May 2017, 01:27 PM
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
0
Nisha
Top achievements
Rank 1
answered on 01 Jun 2017, 06:03 AM

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.

0
Stefan Nenchev
Telerik team
answered on 05 Jun 2017, 03:40 PM
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
0
Stefan Nenchev
Telerik team
answered on 06 Jun 2017, 11:00 AM
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
Tags
ListView - Xamarin.Android
Asked by
Nisha
Top achievements
Rank 1
Answers by
Nisha
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Tsvyatko
Telerik team
Stefan Nenchev
Telerik team
Share this question
or