How to hold the row selection after the cell is deactivated in WinForms GridControl?
Hold the row selection
In order to hold the row selection after the cell is deactivated, the SelectionChanging event can be used. The selection can be canceled by using the Cancel property.
// Trigger the required event.
gridControl1.Model.SelectionChanging += Model_SelectionChanging;
void Model_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
{
if (e.Reason == GridSelectionReason.MouseDown || e.Reason == GridSelectionReason.Clear)
e.Cancel = true;
}'Trigger the required event.
AddHandler Me.gridControl1.Model.SelectionChanging, AddressOf Model_SelectionChanging
Private Sub Model_SelectionChanging(ByVal sender As Object, ByVal e As GridSelectionChangingEventArgs)
If e.Reason = GridSelectionReason.MouseDown OrElse e.Reason = GridSelectionReason.Clear Then
e.Cancel = True
End If
End SubThe screenshot below shows the holding of row selection

Sample Links: