Esempio n. 1
0
        /// <summary>
        /// Creates detail grid view in a container.
        /// </summary>
        /// <param name="container">The container control in which this template is instantiated.</param>
        public void InstantiateIn(Control container)
        {
            parent    = container;
            masterKey = ((GridViewDetailRowTemplateContainer)parent).KeyValue;

            var pageControl = new ASPxPageControl();

            foreach (var childTableMeta in masterTableMeta.Children.Where(c => c.IsRendered == true))
            {
                var tabPage     = new TabPage(childTableMeta.Caption);
                var gridCreator = new DetailGridCreator(childTableMeta, masterTableMeta, masterKey, connectionString, permissions);
                tabPage.Controls.Add(gridCreator.CreateDetailGrid());
                pageControl.TabPages.Add(tabPage);
            }
            parent.Controls.Add(pageControl);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates detail grid view and its header (H3) in a container.
        /// </summary>
        /// <param name="container">The container control in which this template is instantiated.</param>
        public void InstantiateIn(Control container)
        {
            parent    = container;
            masterKey = ((GridViewDetailRowTemplateContainer)parent).KeyValue;
            var gridCreator = new DetailGridCreator(detailTable, masterTableMeta, masterKey, connectionString, permissions);

            btnExport        = buttonExportGrid();
            masterGridExport = CreateGridExport();
            if (masterTableMeta.Caption.ToLower() == "alterations" || masterTableMeta.Caption.ToLower() == "vehicleorders" ||
                masterTableMeta.Caption.ToLower() == "packinglists" || masterTableMeta.Caption.ToLower() == "dialogs" || masterTableMeta.Caption.ToLower() == "productionsequence")
            {
                parent.Controls.Add(btnExport);
            }
            parent.Controls.Add(new LiteralControl(string.Format("<h3>{0}</h3>", detailTable.Caption)));
            parent.Controls.Add(gridCreator.CreateDetailGrid());
            parent.Controls.Add(masterGridExport);
        }