private static WebControl CreateButtonPanel(BasePanelConfiguration panelConfiguration)
        {
            Panel buttonPanelContainer = null;
            ButtonPanelConfiguration configuration = panelConfiguration as ButtonPanelConfiguration;
            if (configuration != null)
            {
                buttonPanelContainer = new Panel { CssClass = "buttonpanel" };
                buttonPanelContainer.Style["margin-top"] = "1px";

                ButtonPanel buttonPanel = new ButtonPanel
                {
                    ID = string.Format(CultureInfo.InvariantCulture, "ButtonPanel_{0}_{1}", QueryStringUtility.ObjectId, configuration.Id),
                    Configuration = configuration
                };

                buttonPanelContainer.Controls.Add(buttonPanel);
            }

            return buttonPanelContainer;
        }
        private static WebControl CreateQueryPanel(BasePanelConfiguration panelConfiguration)
        {
            Panel queryPanelContainer = null;
            QueryPanelConfiguration configuration = panelConfiguration as QueryPanelConfiguration;
            if (configuration != null)
            {
                queryPanelContainer = new Panel { CssClass = "querypanel" };

                QueryPanel queryPanel = new QueryPanel
                {
                    ID = string.Format(CultureInfo.InvariantCulture, "QueryPanel_{0}_{1}", QueryStringUtility.ObjectId, configuration.Id),
                    Configuration = configuration
                };

                queryPanelContainer.Controls.Add(queryPanel);
            }

            return queryPanelContainer;
        }
        private static WebControl CreateGridViewPanel(BasePanelConfiguration panelConfiguration, DynamicPageConfiguration dynamicPageConfiguration)
        {
            Panel gridPanelContainer = null;
            GridViewPanelConfiguration configuration = panelConfiguration as GridViewPanelConfiguration;

            if (configuration != null)
            {
                gridPanelContainer = new Panel { CssClass = "gridviewpanel" };

                GridViewPanel gridViewPanel = new GridViewPanel
                {
                    ID = string.Format(CultureInfo.InvariantCulture, "GridViewPanel_{0}_{1}", QueryStringUtility.ObjectId, configuration.Id),
                    Configuration = configuration,
                    AsUniqueGridView = true,
                    DetailPanelPlugin = ResolveDetailPanelConfiguration(dynamicPageConfiguration),
                    AggregatePanelPlugin = ResolveAggregatePanelConfiguration(dynamicPageConfiguration)
                };

                gridPanelContainer.Controls.Add(gridViewPanel);
            }

            return gridPanelContainer;
        }