/// <summary>
        /// 该节点是否为某一级节点的最后一个子结点
        /// </summary>
        /// <param name="level">节点层级</param>
        /// <returns></returns>
        private bool IsLastCell(int level)
        {
            int row = DataGridView.Rows.GetNextRow(RowIndex, DataGridViewElementStates.None);

            if (row == -1)
            {
                return(true);
            }
            DataGridViewGroupCell cel = DataGridView.Rows[row].Cells[0] as DataGridViewGroupCell;

            return(cel.GroupLevel == level);
        }
 /// <summary>
 /// 添加子结点
 /// </summary>
 /// <param name="cell"></param>
 /// <returns></returns>
 public int AddChildCell(DataGridViewGroupCell cell)
 {
     return(AddChildCellRange(new DataGridViewGroupCell[] { cell }));
 }
 public DataGridViewGroupColumn()
 {
     CellTemplate = new DataGridViewGroupCell();
     ReadOnly     = true;
 }