MakeColumnFromPropertyDescriptor() публичный Метод

Make a column from the given PropertyDescriptor
public MakeColumnFromPropertyDescriptor ( PropertyDescriptor pd ) : OLVColumn
pd System.ComponentModel.PropertyDescriptor
Результат OLVColumn
        /// <summary>
        /// Create columns for the listview based on what properties are available in the data source
        /// </summary>
        /// <remarks>
        /// <para>This method will create columns if there is not already a column displaying that property.</para>
        /// </remarks>
        protected virtual void CreateColumnsFromSource()
        {
            if (this.CurrencyManager == null)
            {
                return;
            }

            // Don't generate any columns in design mode. If we do, the user will see them,
            // but the Designer won't know about them and won't persist them, which is very confusing
            if (this.ListView.IsDesignMode)
            {
                return;
            }

            // Don't create columns if we've been told not to
            if (!this.AutoGenerateColumns)
            {
                return;
            }

            // Use a Generator to create columns
            Generator generator = Generator.Instance as Generator ?? new Generator();

            PropertyDescriptorCollection properties = this.CurrencyManager.GetItemProperties();

            if (properties.Count == 0)
            {
                return;
            }

            bool wereColumnsAdded = false;

            foreach (PropertyDescriptor property in properties)
            {
                if (!this.ShouldCreateColumn(property))
                {
                    continue;
                }

                // Create a column
                OLVColumn column = generator.MakeColumnFromPropertyDescriptor(property);
                this.ConfigureColumn(column, property);

                // Add it to our list
                this.ListView.AllColumns.Add(column);
                wereColumnsAdded = true;
            }

            if (wereColumnsAdded)
            {
                generator.PostCreateColumns(this.ListView);
            }
        }