Example #1
0
        ASPxSplitter LayoutMasterDetail(Control detailControl, ASPxGridView gridView, IModelSplitLayout splitLayout) {
            ASPxSplitter splitter = CreateSplitter(splitLayout, PaneResized(gridView));
            var listPane = CreateSplitterListPane(splitter);
            listPane.Controls.Add(gridView);

            var callbackPanel = CreateSplitterDetailPane(splitter);
            callbackPanel.Controls.Add(detailControl);
            return splitter;
        }
Example #2
0
 ASPxSplitter CreateAsPxSplitter(IModelSplitLayout splitLayout, string paneResize) {
     var splitter = new ASPxSplitter {
         ID = "MasterDetailSplitter",
         ClientIDMode = ClientIDMode.Static,
         Orientation = (splitLayout.Direction == FlowDirection.Horizontal) ? Orientation.Horizontal : Orientation.Vertical,
         ShowCollapseBackwardButton = true,
         ShowCollapseForwardButton = true
     };
     splitter.ClientSideEvents.Init = "function (s,e) {s.AdjustControl(); s.GetMainElement().ClientControl = s;}";
     splitter.ClientSideEvents.PaneResized = paneResize;
     return splitter;
 }
Example #3
0
        private ASPxSplitter CreateSplitter(IModelSplitLayout splitLayout, IListControlAdapter adapter)
        {
            var splitter = new ASPxSplitter {
                ID          = "MasterDetailSplitter",
                Orientation =
                    (splitLayout.Direction == FlowDirection.Horizontal)
                        ? Orientation.Horizontal
                        : Orientation.Vertical,
                ShowCollapseBackwardButton = true,
                ShowCollapseForwardButton  = true
            };

            splitter.ClientSideEvents.PaneResized = GetPaneResizedEventScript(adapter);
            return(splitter);
        }
        /// <summary>
        /// Layouts the controls.
        /// </summary>
        /// <param name="layoutInfo">The layout information.</param>
        /// <param name="firstItem">The first item.</param>
        /// <param name="secondItem">The second item.</param>
        /// <exception cref="ArgumentNullException">firstItem</exception>
        public void LayoutControls(IModelSplitLayout layoutInfo, ViewItem firstItem, ViewItem secondItem)
        {
            if (firstItem == null)
            {
                throw new ArgumentNullException("firstItem");
            }

            if (secondItem != null)
            {
                this.layoutInfo = layoutInfo;
                singleControl   = null;
                InitPanels((Control)firstItem.Control, (Control)secondItem.Control);
                FillMap(firstItem, secondItem);
                ApplyModel();
            }
            else
            {
                singleControl = (Control)firstItem.Control;
                //singleControl.Dock = DockStyle.Fill;
            }
        }
Example #5
0
 bool IsMasterDetail(IModelNode layoutInfo, ViewItemsCollection detailViewItems, IModelSplitLayout splitLayout) {
     return splitLayout != null && detailViewItems.Count > 1 && ((IModelListView)layoutInfo.Parent).MasterDetailMode == MasterDetailMode.ListViewAndDetailView;
 }
Example #6
0
        ASPxSplitter CreateSplitter(IModelSplitLayout splitLayout, string paneResize) {
            var splitter = new ASPxSplitter {
                ID = "MasterDetailSplitter",
                Orientation = (splitLayout.Direction == FlowDirection.Horizontal) ? Orientation.Horizontal : Orientation.Vertical,
                ShowCollapseBackwardButton = true,
                ShowCollapseForwardButton = true
            };

            splitter.ClientSideEvents.PaneResized = paneResize;
            return splitter;
        }
Example #7
0
        ASPxSplitter LayoutMasterDetail(Control detailControl, IListControlAdapter adapter, IModelSplitLayout splitLayout)
        {
            ASPxSplitter splitter = CreateSplitter(splitLayout, adapter);
            var          listPane = CreateSplitterListPane(splitter);

            listPane.Controls.Add(adapter.Control);

            var callbackPanel = CreateSplitterDetailPane(splitter);

            callbackPanel.Controls.Add(detailControl);
            return(splitter);
        }
Example #8
0
 bool IsMasterDetail(IModelNode layoutInfo, ViewItemsCollection detailViewItems, IModelSplitLayout splitLayout)
 {
     return(splitLayout != null && detailViewItems.Count > 1 && ((IModelListView)layoutInfo.Parent).MasterDetailMode == MasterDetailMode.ListViewAndDetailView);
 }
Example #9
0
        private ASPxSplitter CreateSplitter(IModelSplitLayout splitLayout, IListControlAdapter adapter) {
            var splitter = new ASPxSplitter {
                ID = "MasterDetailSplitter",
                Orientation =
                    (splitLayout.Direction == FlowDirection.Horizontal)
                        ? Orientation.Horizontal
                        : Orientation.Vertical,
                ShowCollapseBackwardButton = true,
                ShowCollapseForwardButton = true
            };

            splitter.ClientSideEvents.PaneResized = GetPaneResizedEventScript(adapter);
            return splitter;
        }
Example #10
0
        ASPxSplitter LayoutMasterDetail(Control detailControl, IListControlAdapter adapter, IModelSplitLayout splitLayout) {
            ASPxSplitter splitter = CreateSplitter(splitLayout, adapter);
            var listPane = CreateSplitterListPane(splitter);
            listPane.Controls.Add(adapter.Control);

            var callbackPanel = CreateSplitterDetailPane(splitter);
            callbackPanel.Controls.Add(detailControl);
            return splitter;
        }