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; }
private void TreeList_CustomJSProperties(object sender, TreeListCustomJSPropertiesEventArgs e) { ASPxTreeList tree = sender as ASPxTreeList; Hashtable dropDownHashtable = new Hashtable(); if (tree != null) { foreach (TreeListNode node in tree.GetVisibleNodes()) { dropDownHashtable.Add(node.Key, node[DisplayColumnName]); } } e.Properties[DropDownHashtableId] = dropDownHashtable; }
protected void tgrdAccountBalance_HtmlRowPrepared(object sender, DevExpress.Web.ASPxTreeList.TreeListHtmlRowEventArgs e) { ASPxTreeList treelist = sender as ASPxTreeList; int visibleIndex = treelist.GetVisibleNodes().IndexOf(treelist.FindNodeByKeyValue(e.NodeKey)); if (e.Level == 1) { e.Row.Font.Bold = true; } Account _account = session.GetObjectByKey <Account>(e.GetValue("AccountId")); if (_account != null) { if (_account.AccountTypeId.AccountCategoryId.AccountCategoryId == Guid.Parse("C1EC8F33-C4F6-4312-AE4A-6F8FD3A1F5DB")) { e.Row.BackColor = Color.FromArgb(211, 235, 183); } else { e.Row.BackColor = Color.FromArgb(0, 255, 255); } } }