I have a list view that after a double click, a record opens a new form to show the details, but the record in the list view lost the "selection".... How do I know which record was clicked ???
Thanks
Maria João
The ListView in C# provides an interface to display a list of items using different views including text, small images, and large images.
A list view is an adapter view that does not know the details, such as type and contents, of the views it contains. Instead list view requests views on demand from a ListAdapter as needed, such as to display new views as the user scrolls up or down. In order to display items in the list, call setAdapter(android.
The control has four view modes: LargeIcon, SmallIcon, List, and Details.
List view (ListView) controls are used to display a collection of items, each having a text label and, optionally, an icon and a check box. List view can display items in several modes - with full-sized icons or small icons, with additional information displayed in columns on the right of the item, and so on.
The listview control has a HideSelection property that defaults to True. Set this to False and the current row will remain highlighted even if the control loses focus.
Try setting the HideSelection property on the list view to false. It's enabled by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With