change handling for the treegrid and reduce the delay for the api call