I've set the row span style, the selection is applied only for the single cell but I need it for the whole merged cell. I've added the code for your reference. Please check image & do the needful.
code :
MergeVertically(Me.rdgvRGrid, New Integer() {0, 1})
Private Sub MergeVertically(radGridView As RadGridView, columnIndexes As Integer())
Dim Prev As GridViewRowInfo = Nothing
For Each item As GridViewRowInfo In radGridView.Rows
If Prev IsNot Nothing Then
Dim firstCellText As String = String.Empty
Dim secondCellText As String = String.Empty
For Each As Integer In columnIndexes
Dim firstCell As GridViewCellInfo = Prev.Cells(i)
Dim secondCell As GridViewCellInfo = item.Cells(i)
firstCellText = (If(firstCell IsNot Nothing AndAlso firstCell.Value IsNot Nothing, firstCell.Value.ToString(), String.Empty))
secondCellText = (If(secondCell IsNot Nothing AndAlso secondCell.Value IsNot Nothing, secondCell.Value.ToString(), String.Empty))
setCellBorders(firstCell, Color.FromArgb(209, 225, 245))
setCellBorders(secondCell, Color.FromArgb(209, 225, 245))
If firstCellText = secondCellText Then
firstCell.Style.BorderBottomColor = Color.White
secondCell.Style.BorderTopColor = Color.White
secondCell.Style.ForeColor = Color.Transparent
Else
secondCell.Style.ForeColor = Color.Black
Prev = item
Exit For
End If
Next
Else
Prev = item
End If
Next
End Sub
Private Sub setCellBorders(cell As GridViewCellInfo, color As Color)
cell.Style.CustomizeBorder = True
cell.Style.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.FourBorders
cell.Style.BorderLeftColor = color
cell.Style.BorderRightColor = color
cell.Style.BorderBottomColor = color
If cell.Style.BorderTopColor <> Color.Transparent Then
cell.Style.BorderTopColor = color
End If
End Sub