How to merge rows in a grid?

How everyone,

I have the requirement to merge two or more rown in a grid. An example is shown below:

Col A Col B Col C
1 2 ab
7 9 yz

If the value of col A and col B are same for two rows and Col C value is different then both rows for col A and Col B should be merged.

Thank You

  Discussion posts and replies are publicly visible