I am trying to Merge some cells in a WPF datagrid when the values are the same.

But I also have a function for the double clicking the datagrid, where it takes multiple column values from the...