You have to tweak the sample since in your case the objects displayed in your datagrid are not the graphics displayed in the map but the objects coming from your RIA domain service (i.e it's not the same instances)
One way may be to use the 'ObjectID' to retrieve the graphics when the selection changes in the datagrid, and, viceversa, to find the row in the datagrid when the selection changes in the map.