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); }
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); }
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); }
/// <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); } } }
/// <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); } } }