SingleSelGrid



Sub UpdateGrid(grdInput As MSFlexGrid)
If grdInput.Rows = (grdInput.FixedRows + 1) Then
' only one row in the grid and it

' it a fixed one: don't do anything

Exit Sub
Else
' more than one row in the grid

If grdInput.RowSel <> grdInput.Row Then
' user selected a different row in the grid

' than the current row:

' set it to the highlighted row

grdInput.RowSel = grdInput.Row
End If
End If
End Sub

'In the SelChange event for a grid, put in this code:

Private Sub myGrid_SelChange
UpdateGrid myGrid
End Sub


(singleselgrid.html)- by Paolo Puglisi - Modifica del 25/3/2019