Ejemplo n.º 1
0
        public ColumnBase ColumnFor <T, TProperty>(T model, Expression <Func <T, TProperty> > expression) where T : class
        {
            var meta   = ModelMetadata.FromLambdaExpression(expression, new ViewDataDictionary <T>());
            var column = TablePanel.CreateColumn(meta, this.HtmlHelper.ViewContext);

            return(column);
        }
Ejemplo n.º 2
0
        public ColumnBase ColumnFor <TProperty>(Expression <Func <TModel, TProperty> > expression)
        {
            var meta   = ModelMetadata.FromLambdaExpression(expression, this.HtmlHelper.ViewData);
            var column = TablePanel.CreateColumn(meta, this.HtmlHelper.ViewContext);

            return(column);
        }
Ejemplo n.º 3
0
        public ColumnBase For <TProperty>(Expression <Func <T, TProperty> > expression)
        {
            var meta   = ModelMetadata.FromLambdaExpression(expression, new ViewDataDictionary <T>());
            var column = TablePanel.CreateColumn(meta, this.helper.ViewContext);

            this.columns.Add(column);

            return(column);
        }
Ejemplo n.º 4
0
            public TBuilder ColumnFor <T, TProperty>(T model, Expression <Func <T, TProperty> > expression) where T : class
            {
                var viewContext = Ext.Net.X.Builder.HtmlHelper.ViewContext;
                var column      = TablePanel.CreateColumn(ModelMetadata.FromLambdaExpression(expression, new ViewDataDictionary <T>()), Ext.Net.X.Builder.HtmlHelper.ViewContext);

                this.ToComponent().ColumnModel.Columns.Add(column);

                return(this as TBuilder);
            }
Ejemplo n.º 5
0
        /// <summary>
        ///
        /// </summary>
        protected internal override void FeatureRemoved()
        {
            base.FeatureRemoved();

            if (this.GroupHeaderTpl != null)
            {
                TablePanel panel = this.ParentComponent as TablePanel;

                if (panel != null)
                {
                    panel.Controls.Remove(this.GroupHeaderTpl);
                    panel.LazyItems.Remove(this.GroupHeaderTpl);
                }
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        protected internal override void FeatureAdded()
        {
            base.FeatureAdded();

            if (this.GroupHeaderTpl != null)
            {
                TablePanel panel = this.ParentComponent as TablePanel;

                if (panel != null)
                {
                    this.GroupHeaderTpl.EnableViewState = false;
                    panel.Controls.Add(this.GroupHeaderTpl);
                    panel.LazyItems.Add(this.GroupHeaderTpl);
                }
            }
        }