Here is some code that will highlight the text in a cell. It makes sure the proper cell is active and being edited as this is the only way you can display selected text in a cell currently. Now if you want to simultaneously select text in several cells, that would require a custom cell control with you drawing the selection rectangle yourself within the cell. This code uses the standard selection process of the edit control which is only available for the currentcell.
Public Sub SelectCellText(ByVal row As Integer, ByVal col As Integer, ByVal selStart As Integer, ByVal selLength As Integer)
Try
Me.GridControl1.Focus()
If Not Me.GridControl1.CurrentCell.HasCurrentCellAt(row, col) Then
Me.GridControl1.CurrentCell.MoveTo(row, col, Syncfusion.Windows.Forms.Grid.GridSetCurrentCellOptions.SetFocus Or Syncfusion.Windows.Forms.Grid.GridSetCurrentCellOptions.ScrollInView, False)
ElseIf Not Me.GridControl1.CurrentCell.IsEditing Then
Me.GridControl1.CurrentCell.BeginEdit()
End If
Dim tb As GridTextBoxControl = CType(Me.GridControl1.CurrentCell.Renderer.Control, GridTextBoxControl)
tb.SelectionLength = selLength
tb.SelectionStart = selStart
Catch
End Try
End Sub
To decide whether a cell is visible or not, you can use the methods GridControl.ViewLayout.IsColVisible and GridControl.ViewLayout.IsRowVisible.