コード例 #1
0
        protected override bool ProcessListOverride(
            XmlReader reader,
            object listOwner,
            PropertyDescriptor ownerProperty,
            IList list)
        {
            if (list is GridViewTemplateCollection)
            {
                this.ReadMergeCollection(reader, listOwner, ownerProperty, list, (string)null);
                return(true);
            }
            if (!(list is GridViewColumnCollection))
            {
                return(base.ProcessListOverride(reader, listOwner, ownerProperty, list));
            }
            GridViewColumnCollection columnCollection = list as GridViewColumnCollection;

            columnCollection.BeginUpdate();
            FilterDescriptorCollection descriptorCollection = (FilterDescriptorCollection)null;

            if (columnCollection.Owner != null)
            {
                descriptorCollection = columnCollection.Owner.FilterDescriptors;
            }
            descriptorCollection?.BeginUpdate();
            for (int index = 0; index < list.Count; ++index)
            {
                GridViewDataColumn gridViewDataColumn = list[index] as GridViewDataColumn;
                if (gridViewDataColumn != null)
                {
                    gridViewDataColumn.FilterDescriptor = (FilterDescriptor)null;
                }
            }
            this.ReadMergeCollection(reader, listOwner, ownerProperty, list, "UniqueName");
            descriptorCollection?.EndUpdate();
            columnCollection.EndUpdate();
            return(true);
        }