Ejemplo n.º 1
0
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            Controls.Clear();
            RockControlHelper.CreateChildControls(this, Controls);

            _mpMetricCategory = new MetricCategoryPicker();
            _mpMetricCategory.AllowMultiSelect = false;
            _mpMetricCategory.ID          = this.ID + "_mpMetric";
            _mpMetricCategory.SelectItem += mpMetric_SelectItem;
            Controls.Add(_mpMetricCategory);

            _phEntityTypeEntityIdValue    = new PlaceHolder();
            _phEntityTypeEntityIdValue.ID = this.ID + "_phEntityTypeEntityIdValue";
            _phEntityTypeEntityIdValue.EnableViewState = false;
            Controls.Add(_phEntityTypeEntityIdValue);

            // figure out which picker to render based on the Metric's Entity
            UpdateEntityTypeControls();
        }
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            Controls.Clear();
            RockControlHelper.CreateChildControls( this, Controls );

            _mpMetricCategory = new MetricCategoryPicker();
            _mpMetricCategory.AllowMultiSelect = false;
            _mpMetricCategory.ID = this.ID + "_mpMetric";
            _mpMetricCategory.SelectItem += mpMetric_SelectItem;
            Controls.Add( _mpMetricCategory );

            _phEntityTypeEntityIdValue = new PlaceHolder();
            _phEntityTypeEntityIdValue.ID = this.ID + "_phEntityTypeEntityIdValue";
            _phEntityTypeEntityIdValue.EnableViewState = false;
            Controls.Add( _phEntityTypeEntityIdValue );

            // figure out which picker to render based on the Metric's Entity
            UpdateEntityTypeControls();
        }