Property to allow o...
Clear all

Property to allow only single-row selection?


Topic starter


When I set the SelectionType property in the IDE to Single, I can still select multiple rows with CMD + CLICK.
I looked at the Help topic here:


But it doesn't really say anything. The assumption I made was in the IDE, under List Behaviour, the SelectionType property was for the list-row. 

I can loop through all the selected rows with this, but it's clunky. Is there another way?

Dim rows() As Integer = Me.SelectedRows ' this a list of row indexes
Dim shipmentIdColumnIndex As Integer = 11 ' this is the cell index that contains the data I want to retrieve.
Dim shipmentId As Integer = 0 ' this is the value I need to populate

For Each selectedRowIndex As Integer In rows
shipmentId = Val( Str( Me.Cell( selectedRowIndex, shipmentIdColumnIndex ) ) )
Exit ' as soon as I have the first value, exit the loop ... very messy.

Is there not something like: 

Dim rowIndex As Integer = Me.SelectedRow 


This topic was modified 2 years ago 2 times by RobHallock