본문 바로가기

IT/Component

[DevExpress] Grid 에서 그룹Row 를 제외한 Row Handle List 받아오기

private IList<int> GetSelectDataSourceRowIndexWithoutGroup() {
   IList<int> _list = new List<int>();
   try {
    int[] _arrHandles = gridView2.GetSelectedRows();
    foreach(int _handle in _arrHandles) {
     if(!gridView2.IsGroupRow(_handle)) {
      _list.Add(gridView2.GetDataSourceRowIndex(_handle));
     }
    }
   
   } catch(Exception ex) {
    MyLogger.SendLog(EnNlogLevel.ERROR, ex.ToString(), "GetSelectRowhandleCountWithoutGroup");
    return new List<int>();
   }
   return _list;
}

GridView 의 isGroupRow 함수 사용이 관건