I tryed your example but not working Group change by dropDown
I have below changes in your exmplae - "Row grouping".
1) Add html part
<select id='pivotDropDown' >
<option value="-1">Select Group</option>
<option value="sport,athlete">View 1</option>
<option value="Country,age">View 2</option>
</select>
2) javascript
$("#pivotDropDown").change(function(){
grid.Group().option({ dataIndx: [] });
var GM = grid.option("groupModel");
var groupOptionArr=$("#pivotDropDown").val()
var groupRowArr=groupOptionArr.split(",");
for(var i=0;i<groupRowArr.length;i++){
GM.dataIndx.push(groupRowArr);
}
grid.refreshDataAndView()
})