Represents a collection of Column objects
Inheritance: System.Collections.CollectionBase
Esempio n. 1
0
        /// <summary>
        /// Edits the value of the specified object using the specified 
        /// service provider and context
        /// </summary>
        /// <param name="context">An ITypeDescriptorContext that can be used to gain additional context information</param>
        /// <param name="isp">A service provider object through which editing services can be obtained</param>
        /// <param name="value">the value of the object under edit</param>
        /// <returns>The new value of the object. If the value is not changed, this should return the original value</returns>
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider isp, object value)
        {
            this.columnCollection = (ColumnCollection) value;

            foreach (Column column in this.columnCollection)
            {
                column.PropertyChanged += new ColumnEventHandler(this.column_PropertyChanged);
            }

            object newCollection = base.EditValue(context, isp, value);

            ColumnModel columns = (ColumnModel)context.Instance;

            if (columns.Table != null)
            {
                columns.Table.PerformLayout();
                columns.Table.Refresh();
            }

            return newCollection;
        }
Esempio n. 2
0
        /// <summary>
        /// Initialise default settings
        /// </summary>
        private void Init()
        {
            this.columns = null;

            this.table = null;
            this.headerHeight = ColumnModel.DefaultHeaderHeight;

            this.cellRenderers = new Hashtable();
            this.SetCellRenderer("TEXT", new TextCellRenderer());

            this.cellEditors = new Hashtable();
            this.SetCellEditor("TEXT", new TextCellEditor());

            this.secondarySortOrder = new SortColumnCollection();
        }