Exemplo n.º 1
0
 protected override void OnMouseDown(DataGridViewCellMouseEventArgs e)
 {
     if (e.Location.X > this.InheritedStyle.Padding.Left)
     {
         base.OnMouseDown(e);
     }
     else
     {
         TreeGridRow            nrow = (TreeGridRow)this.DataGridView.Rows[this.RowIndex];
         TreeGridAdvancedColumn ncol = (TreeGridAdvancedColumn)DataGridView.Columns[ColumnIndex];
         ncol._ismousecap = true;
     }
 }
Exemplo n.º 2
0
        protected override void OnMouseUp(DataGridViewCellMouseEventArgs e)
        {
            base.OnMouseUp(e);

            TreeGridRow            nrow = (TreeGridRow)this.DataGridView.Rows[this.RowIndex];
            TreeGridAdvancedColumn ncol = (TreeGridAdvancedColumn)DataGridView.Columns[ColumnIndex];

            if (ncol._ismousecap)
            {
                ncol._ismousecap = false;
                ncol.ClickNode(nrow);
            }
        }