Bug 44776 - ListView doesn't trigger item selection if it has a renderer
Summary: ListView doesn't trigger item selection if it has a renderer
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-09-27 11:32 UTC by Darío
Modified: 2016-10-04 19:26 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Sample project (371.34 KB, patch)
2016-09-27 11:37 UTC, Darío
Project (132.96 KB, application/zip)
2016-10-04 06:59 UTC, Darío

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Darío 2016-09-27 11:32:53 UTC
If you are registered to SelectedItem event in a ListView and the ListView has a renderer, in my case in iOS, the event doesn't trigger. If you removed the renderer, works!

I attached a sample project.
Comment 1 Darío 2016-09-27 11:37:14 UTC
Created attachment 17760 [details]
Sample project
Comment 2 Paul DiPietro [MSFT] 2016-10-01 00:25:17 UTC
Could you re-upload the project? It appears the one there didn't attach correctly (since I assume it'd be a zip).
Comment 3 Samantha Houts [MSFT] 2016-10-03 18:52:58 UTC
@Dario: The attached zip file was corrupted somehow, and we cannot download it. Please submit your reproduction again. Thank you!
Comment 4 Darío 2016-10-04 06:59:03 UTC
Created attachment 17854 [details]
Comment 5 Samantha Houts [MSFT] 2016-10-04 19:26:17 UTC
It looks like your TableDelegate is throwing an exception before the event finishes because your ItemSelected event is not assigned to. You should try:

this.ItemSelected?.Invoke(this, rowIndexPath);

I'm not sure what your app is supposed to do on ItemSelected, but this will at least allow it to complete the event and highlight the row without throwing an exception.