function onDrawGroup(e) {
var salary = 0;
for (var i = 0;i < e.rows.length; i++) {
salary = salary + parseInt(e.rows.salary,10);
}
var salary_string = salary.toString();
e.rows.sort(sortByAge);
for (var i = 0, l = Genders.length; i < l; i++) {
var g = Genders;
if (g.id == e.value && !g.group)
{
g.group = true;
e.rows.add({gender:e.value,salary:salary_string});
}
}