Exemplo n.º 1
0
        /// <summary>
        /// Sets the field's value using an action delegate to the value. Will enter edit mode if the item isn't already editing. Respects security context.
        /// </summary>
        /// <param name="fieldSetAction">Delegate method that will set the field's values.</param>
        protected void SetFieldValue(Action fieldSetAction)
        {
            var editing = new SingleFieldEditor(InnerItem);

            fieldSetAction();

            editing.EnsureEndEditIfStarted();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sets the field's value using a string value. Will enter edit mode if the item isn't already editing. Respects security context.
        /// </summary>
        protected void SetFieldValue(string fieldValue)
        {
            var editing = new SingleFieldEditor(InnerItem);

            InnerField.Value = fieldValue;

            editing.EnsureEndEditIfStarted();
        }