Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
410
WebDataTree Load On Demand Issue with Partial CheckBox State
posted

here's the method that loads the Nodes On Demand on WebDataTree.

If the parent Node is Partial Selected and when that node is expanded using this procedure all the child nodes are Partial Selected even though I am assigning proper value to CheckStatefor that DataTreeNode. It seems that setting the CheckState does not take effect if Parent is partial Selected

 

protected void LoadNode(DataTreeNode dtn)
        {
            if (this.Dimension == null) return;
            XmlDocument xDimensionData = this.Dimension.GetDimensionXml(this.SelectionInfo);
            if (dtn == null)
            {
                this.wdtSelect.Nodes.Clear();
            }
            XmlNodeList xnl = xDimensionData.SelectNodes(this.GetXPathForLevel(dtn == null ? 0 : int.Parse(dtn.Value) + 1));
            foreach (XmlNode xn in xnl)
            {
                DataTreeNode n = new DataTreeNode();
                n.Text = xn.Attributes["Text"].Value;
                n.Key = xn.Attributes["Key"].Value;
                n.Value = xn.Attributes["Level"].Value;
                n.CheckState = this.ConvertToCheckBoxState(xn.Attributes["Selected"].Value);
                n.IsEmptyParent = xn.HasChildNodes;
                if (dtn == null)
                    this.wdtSelect.Nodes.Add(n);
                else
                    dtn.Nodes.Add(n);
            }
        }