Ejemplo n.º 1
0
 protected override void OnMouseDown(DataGridViewCellMouseEventArgs e)
 {
     if (e.Location.X > this.InheritedStyle.Padding.Left)
     {
         base.OnMouseDown(e);
     }
     else
     {
         // Expand the node
         //TODO: Calculate more precise location
         TreeGridNode node = this.OwningNode;
         if (node != null)
         {
             node._grid._inExpandCollapseMouseCapture = true;
             if (node.IsExpanded)
             {
                 node.Collapse();
             }
             else
             {
                 node.Expand();
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void expandNode(TreeGridNode node)
 {
     if (node.Nodes.Count > 0)
     {
         node.Expand();
         foreach (TreeGridNode subNode in node.Nodes)
         {
             expandNode(subNode);
         }
     }
 }