The limitation is that the level field is not accesable during this operations. To explain better. Level field is the last field (if I remember right) and is provided as last in the data.
Example if you have field1, field2, field3,..
then if you format the data of field2 you have acces to field1 and field2, but not to field3, since this field is not yet fetched from the grid.
To resolve the problem
1. You can use afterInsertRow event to add a link, where all the row info is available
2. We can use some tricky way to do this, but my question is in wich format is your data – xml or json? The idea is to use named conventions in the data, wehre you provide the level element before the info element.
sorry i took some time to answer, i had to deliver the application.
In the end we decided to remove the treegrid from this applicatoin, due to performance issues: i have a tree with 2 root elements and each one has about 400-500 children. it loads quickly, but closing the folder (to hide the children) it took about 8 sec's!