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

Selected listview item and ScrollToRowIndex(MVVM)

Hi!

I need help.

When I click on the Collect button, I need the item to be selected, and visible on the screen. Screen scrolling does not follow.




Attachment: SimpleListView_MAUI_505a72f5.zip

3 Replies 1 reply marked as answer

SY Suthi Yuvaraj Syncfusion Team February 27, 2023 03:08 PM UTC

Hi Davi,


Sorry for the delay, we have checked the attached sample and analyzed the required scenario, we recommend you use the SfListView.SelectedItems to achieve your requirement, which holds the collection of the selected item, Also we suggest using CollectionChanged instead of propertyChanged. We have attached the sample modified for your reference.


Also, we suggest you set the height for the image to get the image properly. Please let us know if you have any concerns.


Regards,

Suthi Yuvaraj.


Attachment: SimpleListView_MAUI_505a72f5_82f8260e.zip


DF Davi Fabiano replied to Suthi Yuvaraj February 28, 2023 05:50 PM UTC

Hi!


Thanks for the feedback!

I have a problem. Clicking on the list item is giving error.

Is it possible when selecting the list item and clicking the Collect button, start from the selected item?





SY Suthi Yuvaraj Syncfusion Team March 3, 2023 02:11 PM UTC

Davi,


#Regarding crash while tapping the item.


We have analyzed the sample and found that the property to the selected items must be an object type. we have modified the sample now the sample will work properly without any crashes while tapping the item.


#Regarding selecting the item manually and programmatically start after the manual selection


We recommend you use the selected template to update the selection of items manually and for the programmatic selection, you can update the selected items, which automatically updates the selection. We have attached the sample as per your requirement, please have a look at the sample and let us know if you have any concerns.



Attachment: SimpleListView_MAUI_4af39352.zip

Marked as answer
Loader.
Up arrow icon