public bool RemoveSubSortFilter(int colIndex, bool update = true)
 {
     if (m_AllLevelSortFilter.SortLevel.RemoveAll(x => x.GetColumnIndex(m_TableSource) == colIndex) > 0)
     {
         bool dirty = false;
         m_Filters.Simplify(ref dirty);
         if (update)
         {
             UpdateDisplayTable();
         }
         return(true);
     }
     ReportFilterChanges();
     return(false);
 }
        protected void InitFilter(Database.Operation.Filter.Filter filter, List <Database.CellPosition> expandedCells = null)
        {
            Database.Operation.Filter.FilterCloning fc = new Database.Operation.Filter.FilterCloning();

            var deffilter = filter.Clone(fc);

            if (deffilter != null)
            {
                m_Filters = new Filter.Multi();

                m_Filters.filters.Add(deffilter);

                m_AllLevelSortFilter = fc.GetFirstUniqueOf <Filter.Sort>();
                if (m_AllLevelSortFilter == null)
                {
                    m_AllLevelSortFilter = new Filter.Sort();
                    var ds = new Database.Operation.Filter.DefaultSort(m_AllLevelSortFilter, null);
                    m_Filters.filters.Add(ds);
                }
                bool bDirty = false;
                m_Filters.Simplify(ref bDirty);
                UpdateDisplayTable(expandedCells);
            }
            else
            {
                InitEmptyFilter(expandedCells);
            }
        }