public virtual CustomColumnBuilder <TModel> Custom(string templateString) { CustomColumn <TModel> customColumn = new CustomColumn <TModel>(this.Container, templateString); this.Container.Columns.Add((ColumnBase <TModel>)customColumn); return(new CustomColumnBuilder <TModel>((IColumn)customColumn)); }
public virtual CustomColumnBuilder <TModel> Custom(Func <object, HelperResult> htmlTemplate) { string templateString = htmlTemplate.Invoke(null).ToString(); CustomColumn <TModel> customColumn = new CustomColumn <TModel>(this.Container, templateString); this.Container.Columns.Add((ColumnBase <TModel>)customColumn); return(new CustomColumnBuilder <TModel>((IColumn)customColumn)); }