Hello Erik,
You can use the jQuery index() method to get the current index of the item on the same level. Check this jsFiddle on how to do it hierarchically:
Kind regards,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework -
download Kendo UI now!