Пример #1
0
        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));
        }
Пример #2
0
        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));
        }