GridControl 获取某分组的第一个孩子

int iGroupRowHandle = this.gridControlView.FocusedRowHandle;

            if (iGroupRowHandle < 0)
            {
                int iChildCount = this.gridControl.GetChildRowCount(iGroupRowHandle);
                if (iChildCount > 0)
                {
                    int childRowHandle = this.gridControl.GetChildRowHandle(iGroupRowHandle,0);
                    if (childRowHandle > -1)
                    {
                      object objFirstChild=   this.gridControl.GetRow(childRowHandle);
                      if (objFirstChild != null)
                      {
                          //MessageBox.Show(objFirstChild.ToString());
                      }
                    }
                }
            }

或使用下面来获取一个分组里的第一行
int iFirstChildRowHandle = this.gridControl.GetDataRowHandleByGroupRowHandle(iGroupRowHandle);
            if (iFirstChildRowHandle > -1)
            {
 
            }

 

posted @ 2014-01-23 19:39  quietwalk  阅读(1106)  评论(0编辑  收藏  举报