protected void TreeList_CustomJSProperties(object sender, DevExpress.Web.ASPxTreeList.TreeListCustomJSPropertiesEventArgs e)
    {
        ASPxTreeList tree          = sender as ASPxTreeList;
        Hashtable    employeeNames = new Hashtable();

        foreach (TreeListNode node in tree.GetVisibleNodes())
        {
            employeeNames.Add(node.Key, node["FirstName"] + " " + node["LastName"]);
        }
        e.Properties["cpEmployeeNames"] = employeeNames;
    }
    protected void ASPxTreeList1_CustomJSProperties(object sender, DevExpress.Web.ASPxTreeList.TreeListCustomJSPropertiesEventArgs e)
    {
        Hashtable data = new Hashtable();

        string[] filedNames = new string[] { "Department", "Budget", "Location" };
        foreach (TreeListNode node in ASPxTreeList1.GetVisibleNodes())
        {
            Hashtable tuplet = new Hashtable();
            foreach (string fieldName in filedNames)
            {
                tuplet[ASPxTreeList1.Columns[fieldName].Index] = node[fieldName];
            }
            data[node.Key] = tuplet;
        }
        e.Properties["cpData"] = data;
    }
        protected void TreeList_CustomJSProperties(object sender, DevExpress.Web.ASPxTreeList.TreeListCustomJSPropertiesEventArgs e)
        {
            ASPxTreeList tree = (ASPxTreeList)sender;

            e.Properties["cpSiblingKeys"] = tree.GetAllNodes().ToDictionary(n => n.Key, n => n.ParentNode.ChildNodes.OfType <TreeListNode>().Select(c => c.Key));
        }