Esempio n. 1
0
        /// <summary>
        /// Begins the editing mode and change the data value for specified column.
        /// </summary>
        /// <typeparam name="T">The data type of column.</typeparam>
        /// <param name="column">The column.</param>
        /// <param name="value">The data value.</param>
        public void EditValue <T>(Column <T> column, T value)
        {
            column = (Column <T>)VerifyColumn(column, nameof(column));

            var elementManager = ElementManager;

            elementManager?.SuspendInvalidateView();
            BeginEdit();
            column[DataRow] = value;
            DataPresenter?.OnEdit(column);
            elementManager?.InvalidateView();
            elementManager?.ResumeInvalidateView();
        }
Esempio n. 2
0
        /// <summary>
        /// Gets or sets the data value for specified column.
        /// </summary>
        /// <param name="column">The column.</param>
        /// <returns>The data value.</returns>
        public object this[Column column]
        {
            get { return(this[column, false]); }
            set
            {
                column = VerifyColumn(column, nameof(column));

                var elementManager = ElementManager;
                elementManager?.SuspendInvalidateView();
                BeginEdit();
                column.SetValue(DataRow, value);
                DataPresenter?.OnEdit(column);
                elementManager?.InvalidateView();
                elementManager?.ResumeInvalidateView();
            }
        }