<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">  
    <%: Html.Telerik().TreeView()
            .Name("TreeView")
            .DataBinding(binding => binding
                .Ajax().Select("AjaxLoading", "Home")
            )
            .ClientEvents(events => events
                .OnDataBound("onDataBound")
            )
    %>

    <script type="text/javascript">
        function onDataBound(e) {
            var treeviewElement = $(this),
                treeview = treeviewElement.data("tTreeView");

            treeviewElement.find(".t-item").each(function() {
                var element = $(this),
                    data = element.find('> div > .t-in > .data');

                console.log(element, data);

                if (data.length) {
                    element.css('background-color', '#' + data.text());
                    data.remove();
                }
            });
        }
    </script>
</asp:Content>
