I have such DataGrid
Before clear, pick up the currently selected item (a unique identifier if you have one) then attempt to highlight it again on update and if it's not there anymore just don't highlight annything.