/// <summary>
 /// Initializes a new instance of the <see cref="UPGroupModelController"/> class.
 /// </summary>
 /// <param name="formItem">The form item.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPGroupModelController(FormItem formItem, IGroupModelControllerDelegate theDelegate)
 {
     this.Delegate                = theDelegate;
     this.FormItem                = formItem;
     this.controllerState         = GroupModelControllerState.Empty;
     this._changedControllerState = true;
     this.RequestOption           = UPRequestOption.FastestAvailable;
     this.RootTabIndex            = -1;
 }
        /// <summary>
        /// Handles the empty group.
        /// </summary>
        /// <returns></returns>
        public virtual bool HandleEmptyGroup()
        {
            this.controllerState = GroupModelControllerState.Empty;
            this.Group           = null;
            if (this.alternateGroupModelController != null)
            {
                this.AlternateGroupModelControllerActive = true;
                if (this._applyResultRow != null)
                {
                    this.alternateGroupModelController.ApplyResultRow(this._applyResultRow);
                }
                else
                {
                    this.alternateGroupModelController.ApplyContext(this._applyDictionary);
                }

                return(this.alternateGroupModelController.controllerState != GroupModelControllerState.Pending);
            }

            return(true);
        }