Hi,
I ended up implementing the below code and it works as expected:
var team = options.$trigger.closest('tr')[0]['data-grid-item'].HierarchicalItem._parentItem.data;
var resource = options.$trigger.closest('tr')[0]['data-grid-item']._data;
var task = options.$trigger[0].DataContext;
$.observable(resource.tasks).remove(task);
if (resource.tasks.length === 0) { //If resource does not contain any more tasks, remove the entire resource line.
$.observable(team.resources).remove(resource); // This will remove the entire resource from the hierarchy.
}
Hope this is the right way to implement this behavior.
Thanks.