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 |

I made it and have worked

if (object.GroupBy == "City")
    $('.change:first').html('City');
if (object.GroupBy == "Banks")
    $('.change:first').html('Banks');
if (object.GroupBy == "Users")
    $('.change:first').html('Users');

<select class="combobox" name="GroupBy">
    <option value="City">City</option>
    <option value="Banks">Banks</option>
    <option value="Users">Users</option>
</select>

<table class="form-list-table" width="100%">
    <tr class="form-list-table-header">
         <td class="change" name="Name"></td>
         <td class="" name="Total">Inclusões</td>
    </tr>
</table>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.