Esempio n. 1
0
 private Range ExpandGroupByIndex(long index, bool expand)
 {
     if (expand)
     {
         if (!m_ExpandedGroup.ContainsKey(index))
         {
             var           table = CreateGroupTable(index);
             ExpandedGroup eg    = new ExpandedGroup();
             eg.table = table;
             m_ExpandedGroup[index] = eg;
             return(InsertGroupSubRow(index, Range.FirstToLast(0, table.GetRowCount())));
         }
         return(Range.None);
     }
     else
     {
         ExpandedGroup eg = null;
         if (m_ExpandedGroup.TryGetValue(index, out eg))
         {
             m_ExpandedGroup.Remove(index);
             long rowCount = eg.table.GetRowCount();
             return(RemoveGroupSubRow(index, Range.FirstPlusLength(rowCount, -rowCount)));
         }
         return(Range.None);
     }
 }
Esempio n. 2
0
        public Table GetGroupSubTable(long index)
        {
            ExpandedGroup eg = null;

            if (m_ExpandedGroup.TryGetValue(index, out eg))
            {
                return(eg.table);
            }
            return(null);
        }