/// <summary> /// 得到GroupByRow /// </summary> /// <returns></returns> public static MyGroupByRow GetGroupByRow(this IGrid grid) { foreach (Row row in grid.FixedHeaderRows) { MyGroupByRow r = row as MyGroupByRow; if (r != null) { return(r); } } return(null); }
private void tsmGroup_Click(object sender, EventArgs e) { tsmGroup.Checked = !tsmGroup.Checked; if (tsmGroup.Checked) { m_grid.FixedHeaderRows.Insert(0, new BoundGridGroupByRow()); } else { MyGroupByRow row = m_grid.GetGroupByRow(); if (row != null) { m_grid.FixedHeaderRows.Remove(row); } } }
/// <summary> /// Constructor /// </summary> /// <param name="template"></param> public MyGroupByRow(MyGroupByRow template) : base(template) { this.NoGroupText = title; }