If I understand correctly, you are rendering the TreeView nodes as list items with an ID attribute. If that is the case, you can get the id in the select event handler by accessing the e.node parameter. See the following example from the documentation. It shows how to access the id of a datasource-bound treeview, but the same approach (using the e.node parameter) can be used for any TreeView rendering.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.