Ejemplo n.º 1
0
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            genCon = Frame.GetController<GenController>();
            //Access and customize the target View control.

            var listEditor1 = View.Editor as ASPxGridListEditor;
            if (listEditor1 != null && listEditor1.Model.DataAccessMode == CollectionSourceDataAccessMode.Server)
            {
                foreach (var column in listEditor1.Grid.Columns)
                {
                    var commandColumn = column as GridViewCommandColumn;
                    if (commandColumn != null && commandColumn.ShowSelectCheckbox)
                    {
                        commandColumn.SelectAllCheckboxMode = GridViewSelectAllCheckBoxMode.Page;
                    }
                }
            }

            ASPxGridView grid = ((ListView)this.View).Editor.Control as ASPxGridView;
            if (grid != null)
            {
                grid.DataBound += grid_DataBound;
            }
        }
Ejemplo n.º 2
0
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            genCon  = Frame.GetController <GenController>();
            copyCon = Frame.GetController <CopyController>();

            this.DuplicateDetail.Active.SetItemValue("Enabled", false);

            if (View is ListView && !View.IsRoot)
            {
                NewObjectViewController controller = Frame.GetController <NewObjectViewController>();
                if (controller != null)
                {
                    //controller.NewObjectAction.Execute += NewObjectAction_Execute;
                    controller.ObjectCreated += Controller_ObjectCreated;
                }

                if (typeof(ClassStockTransferDocumentDetail).IsAssignableFrom(View.ObjectTypeInfo.Type))
                {
                    this.DuplicateDetail.Active.SetItemValue("Enabled", true);
                }
                if (typeof(ClassDocumentDetail).IsAssignableFrom(View.ObjectTypeInfo.Type))
                {
                    this.DuplicateDetail.Active.SetItemValue("Enabled", true);
                }
            }
        }
Ejemplo n.º 3
0
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            genCon  = Frame.GetController <GenController>();
            copyCon = Frame.GetController <CopyController>();
            if (View is DetailView)
            {
                ((DetailView)View).ViewEditModeChanged += GenController_ViewEditModeChanged;

                recordnaviator = Frame.GetController <RecordsNavigationController>();
                if (recordnaviator != null)
                {
                    recordnaviator.PreviousObjectAction.Executed += PreviousObjectAction_Executed;
                    recordnaviator.NextObjectAction.Executed     += NextObjectAction_Executed;
                }
                resetButton();
                enableButton();
            }
        }
Ejemplo n.º 4
0
 protected override void OnActivated()
 {
     base.OnActivated();
     // Perform various tasks depending on the target View.
     gen = Frame.GetController <GenController>();
 }