Hi Phil,
This is by design. If you have ExcelLikeCurrentCell & ExcelLikeSelectionFrame set to true, the grid will consider the current cell to be selected.
If you want the consistent behavior like the ExcelLikeCurrentCell is set to false, you can check whether the selection has only the currentcell and can decrement the count by 1 to handle this case. Here is some code snippet.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = (GridControl1.Selections.Count).ToString()
If (GridControl1.Selections.Count = 1) Then
Dim range As GridRangeInfo = New GridRangeInfo
range = GridRangeInfo.Cell(Me.GridControl1.CurrentCell.RowIndex, Me.GridControl1.CurrentCell.ColIndex)
If (Me.GridControl1.Selections.Ranges.ActiveRange.Equals(range)) Then
TextBox1.Text = (GridControl1.Selections.Count - 1).ToString()
End If
End If
End Sub
Attached is the sample.
Thanks.
Jay N
selections.count_2975.zip