2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Hold the row selectionIn order to hold the row selection after the cell is deactivated, the SelectionChanging event can be used. The selection can be canceled by using Cancel property. C# // form() // 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; }
VB ' form() ' Trigger the required event. Private 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 Sub
Screenshot Sample links:
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.