1. Fixed a bug
2. Now the grid switches from Add Mode to Update Mode when an item on tree is clicked.