I have the following code:
if (object.GroupBy == "Cities")
$("body").children().find("td:first[name=Name]>").html("City");
if (object.GroupBy == "Banks")
$("body").children().find("td:first[name=Name]>").html("Banks");
if (object.GroupBy == "User")
$("body").children().find("td:first[name=Name]").html("Users");
<tr class="form-list-table-header">
<td class="" name="Name"></td>
<td class="" name="Total">Total</td>
</tr>
<div><span>Group By</span></div>
<select class="combobox" name="GroupBy">
<option value="Cities">Cities</option>
<option value="Banks">Banks</option>
<option value="Users">Users</option>
</select>
</div>
If the user select Cities, the td is not with the selected option. For example, in the combobox is selected the cities value.
So, in the header of the table will appear:
| Cities | Total |