internal RawItem GetRawItemAtGlobalSortedIndex(int index)
        {
            if (this.IsBottomLevel)
            {
                return(m_sortedRawItems[index]);
            }
            else
            {
                foreach (object value in this.ProtectedItems)
                {
                    DataGridCollectionViewGroup subGroup = value as DataGridCollectionViewGroup;

                    int subGroupCount = subGroup.GlobalRawItemCount;

                    if (index < subGroupCount)
                    {
                        return(subGroup.GetRawItemAtGlobalSortedIndex(index));
                    }

                    index -= subGroupCount;
                }
            }

            throw new ArgumentOutOfRangeException("index");
        }