Example #1
0
    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();
            }
        }
    }
Example #2
0
 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;
     }
 }