How to get the value of the selected row from the ListView?
1 answer
Since this is FMX , not VCL , according to the documentation , you should use the Selected property to get the selected list item (if nothing is selected, it returns nil ).
In general, speaking of this framework, your list items can look as you please and contain any data. But in the standard view, to get the text of the element, use the Text property.
SelectedItemText := TListViewItem(TListView1.Selected).Text; There is also a detail property for add. text.
|
ListView.Selected.TextorListview.Selected.Details- teranTListViewItem(ListView.Selected).Text- teran