Esempio n. 1
0
        internal virtual bool CollapseNode(TreeGridNode node)
        {
            if (!node.IsExpanded)
            {
                return(false);
            }
            CollapsingEventArgs e = new CollapsingEventArgs(node);

            this.OnNodeCollapsing(e);
            if (!e.Cancel)
            {
                this.LockVerticalScrollBarUpdate(true);
                base.SuspendLayout();
                this._inExpandCollapse = true;
                node.IsExpanded        = false;
                foreach (TreeGridNode node2 in node.Nodes)
                {
                    this.UnSiteNode(node2);
                }
                this.OnNodeCollapsed(node);
                this._inExpandCollapse = false;
                this.LockVerticalScrollBarUpdate(false);
                base.ResumeLayout(true);
                base.InvalidateCell(node.Cells[0]);
            }
            return(!e.Cancel);
        }
Esempio n. 2
0
 private void OnNodeCollapsing(CollapsingEventArgs e)
 {
     this.NodeCollapsing?.Invoke(this, e);
 }