### Check Row Selected

To check if a row is selected , make use of an API method (requires the JavaObject library).
Reference: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/TableView.TableViewSelectionModel.html
Example 1 - Check specific row
Dim joTableView As JavaObject = TableView1
Dim TableRow as Int = 12
jo.RunMethodJO("getSelectionModel",Null).RunMethod("isSelected",Array(TableRow))
Example 2 - List the selected rows - show only the first cell with index 0 (r(0))
'Loop over all rows and use IsSelected
`Sub ListRowsSelected
Dim isSelected As Boolean
For i = 0 To TableView1.Items.Size - 1
isSelected = joSelectionModel.RunMethod("isSelected", Array(i, Null))
If isSelected Then
Log("Row " & i & " = " & isSelected)
Dim r() As Object = TableView1.Items.Get(i)
Log(r(0))
End If
Next
End Sub`

Changed: 2018-03-16 18:58, Category: TableView, File: T6C259M1875.htm, ID: 1875