Update treegrid.js

Only use the first item to set the columns is not right. All the follow up fields will only use the field from the first item in the grid, which will give a rendering issue of the item and link.
don't set column base on the last item in the list

use the column that contain most fields , which can also handle to render the label without any links.
Merge pull request #269 from vrspider/patch-1

Update treegrid.js