If we set GridView.OptionsSelection.MultiSelect to False (in a controller), the list of selected objects is not updated, which leads to incorrect operation of actions that depend on selection.
Proposed Solution:
Call the OnSelectionChanged method in such situations:
C#[ListEditor(typeof(object), false)]
public class GridListEditorEx : GridListEditor {
public GridListEditorEx(IModelListView model) : base(model) { }
protected override void OnFocusedObjectChanged() {
base.OnFocusedObjectChanged();
if (GridView != null && !GridView.OptionsSelection.MultiSelect) {
OnSelectionChanged();
}
}
}