Last Updated:
25 Jan 2022 07:27
by ADMIN
GridView: Add mode that allows the control to clear the selection in case an invalid selection is set
Currently, if you have a SelectedItem assigned and you try to set the SelectedItem property to an object that is not presented in the current data view, the control keeps the previously selected item. For example, if you have items 1, 2 and 3 where 1 is selected, and you try to select 4, nothing will happen.
By "current data view" I mean the items that are left in the GridView's Items collection. Those exclude the items that don't match the filtering or search criteria if such is applied.
Add a property that allows you to change this behavior. In case the assigned item cannot be selected, the selection should be cleared.