public IControllerUI Create(Controller Controller, bool ItemUI)
        {
            if (ItemUI)
            {
                DataAvail.DX.XtraReportForm.XtraReportForm reportForm = new DataAvail.DX.XtraReportForm.XtraReportForm((DataAvail.Controllers.Controller)Controller);

                return new CountrollerUI(reportForm);
            }
            else
            {
                DataAvail.DX.XtraListForm.XtraListForm listForm = new DataAvail.DX.XtraListForm.XtraListForm((Controller)Controller);

                if (Controller.TableContext.IsDefaultContext)
                {
                    listForm.MdiParent = this._mdiParent;
                }

                return new CountrollerUI(listForm);
            }
        }
 internal ItemSelector(Controller Controller)
 {
     _controller = Controller;
 }
            internal ControllerCommands(Controller Controller)
            {
                _controller = Controller;

                CreateDefaultCommands();
            }
        public Controller GetChildController(string ParentFieldName, string ChildObjectName, string ChildFieldName)
        {
            if (XtraBinding is XtraBindingContainer)
            {
                XtraBindingChild xtraBindingChild = ((XtraBindingContainer)XtraBinding).Children
                    .FirstOrDefault(p => p.ChildProperties.parentFieldName == ParentFieldName && 
                        p.ChildProperties.fkFieldName == ChildFieldName && 
                        p.ChildProperties.childObjectName == ChildObjectName);

                if (xtraBindingChild != null)
                {
                    XOTableContext itemContext =
                        TableContext.XOTable.ChildrenRelations.First(p => p.ParentField.Name == ParentFieldName &&
                            p.ChildTable.Name == ChildObjectName &&
                            p.ChildField.Name == ChildFieldName).ChildTable.CreateTableChildContext(TableContext.Fields.First(p => p.Name == ParentFieldName));

                    Controller childController = new Controller(xtraBindingChild, itemContext);

                    childController.StateChanged += new EventHandler(childController_StateChanged);

                    _childrenControllers.Add(childController);

                    return childController;
                }
            }

            return null;
        }