void SaveState() { const string prefix = "mycheck_"; foreach (string key in Request.Params) { string value = Request.Params[key]; if (key == "myradio") { StartNodeKey = value; } if (key.StartsWith(prefix) && !string.IsNullOrEmpty(value)) { string nodeKey = key.Substring(prefix.Length); if (value == "H") { HiddenNodeList.Add(nodeKey); } else if (value == "V") { HiddenNodeList.Remove(nodeKey); } ASPxTreeList1.DataBind(); } } }
protected void ASPxTreeList1_HtmlRowPrepared(object sender, TreeListHtmlRowEventArgs e) { if (e.NodeKey == StartNodeKey) { e.Row.BackColor = System.Drawing.Color.LightGreen; } if (HiddenNodeList.Contains(e.NodeKey)) { e.Row.ForeColor = System.Drawing.Color.Silver; } }