You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, when RadGridView is in edit mode, and the user change the current cell, the new cell enters in edit mode automatically. In some cases, clients may want to change this behaviour and end the editing proccess once the user left the current cell. This behavior is represented in the MS DataGrid control. This article describes how one can achieve the same editing behavior as in MS DataGrid.
20
+
By default, when RadGridView is in edit mode, and the user changes the current cell, the new cell enters in edit mode automatically. In some cases, clients may want to change this behavior and end the editing process once the user left the current cell. This behavior is represented in the MS DataGrid control. This article describes how one can achieve the same editing behavior as in MS DataGrid.
21
21
22
22
## Solution
23
23
24
24
To achieve the desired behavior where cell editing ends upon navigating to another cell, you can customize the `GridRowBehavior` of RadGridView. This involves creating a custom `GridRowBehavior` and overriding the `OnMouseDownLeft` method.
25
25
26
26
Here is a custom `GridDataRowBehavior` implementation:
@@ -39,14 +39,14 @@ public class CustomGridDataRowBehavior : GridDataRowBehavior
39
39
returnbase.OnMouseDownLeft(e);
40
40
}
41
41
}
42
-
```
42
+
````
43
43
44
44
To apply this custom behavior, register it with your RadGridView. This custom behavior closes the editor when navigating away from a cell. The `CellBeginEdit` event will trigger for every new cell the user navigates to.
0 commit comments