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);
        }
        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);
        }
Example #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);
        }
Example #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);
            }