Beispiel #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 object to edit the value of</param>
        /// <returns>The new value of the object. If the value of the
        /// object has not changed, this should return the same object
        /// it was passed</returns>
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider isp, object value)
        {
            this.rows = (I3RowCollection)value;

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

            I3TableModel model = (I3TableModel)context.Instance;

            // make sure the TableModel's Table redraws any additions/deletions
            if (model.Table != null)
            {
                model.Table.PerformLayout();
                model.Table.Refresh();
            }

            return(returnObject);
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the RowCollectionEditor class
 /// using the specified collection type
 /// </summary>
 /// <param name="type">The type of the collection for this editor to edit</param>
 public I3RowCollectionEditor(Type type) : base(type)
 {
     this.rows = null;
 }