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

Refresh ListView Interface Programmatically?

2 Answers 177 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 16 May 2017, 04:05 PM

I see that after reordering cells in RadListView, the data is reordered automatically.  That's pretty nice.  I'm looking for a way to go the other direction.  If I reorder the data programmatically, I'd like the interface to refresh so it reflects the order of the data.  Is this possible with RadListView?

2 Answers, 1 is accepted

Sort by
0
Greg
Top achievements
Rank 1
answered on 16 May 2017, 07:20 PM

OK, I figured out I can update the sort descriptor of the list view to make the interface update.  It works fine on iOS.

 

On Android, I'm having a separate problem.  I can click and drag a row but the SelectionChanged event appears to not get invoked.

I have this in my MainActivity.cs as specified on the Getting Started page:

[assembly: ExportRenderer (typeof (Telerik.XamarinForms.DataControls.RadListView), typeof (Telerik.XamarinForms.DataControlsRenderer.Android.ListViewRenderer))]

Am I missing something?

0
Nikolay
Telerik team
answered on 19 May 2017, 08:32 AM
Hello Greg,

Could you, please, refer to the answer we have provided in this forum post, which describes how to achieve this by subscribing to CollectionChanged. Does this provide the required behavior? 

Regards,
Nikolay
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
Tags
ListView
Asked by
Greg
Top achievements
Rank 1
Answers by
Greg
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or