Property to allow o...
 

Property to allow only single-row selection?  

   RSS

0

Hello,

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:

/DataView_piDogScrollingCanvas_1.14.7.0/Docs/Documentation/piDogDataView_Folder/piDogDataView/DataView/Constant/SelectionSingle.html

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.
Next

Is there not something like: 

Dim rowIndex As Integer = Me.SelectedRow 

?

This topic was modified 4 months ago 2 times by RobHallock
Share:

Please Login or Register