middle of modifying the tree grid directive to add on select sample function