You need to escape the inputed characters after editing a row. The code below shows how to achieve this functionality.
$('#tg').treegrid({
onEndEdit: function(row){
row.name = row.name.replace(/</g,'<');
row.name = row.name.replace(/>/g,'>');
}
})