We had a requirement to have a custom button on a subgrid for an entity, and the button should only be enabled if and only if one record is selected.
It should get disabled in case if no records are selected or more than one record selected.
Used the below ribbondiffxml to achieve that