public GridCell(GridColumnBase <T> column, T dataItem) { Column = column; Grid = column.Grid; DataItem = dataItem; Template = new HtmlTemplate <T>(); HtmlAttributes = new Dictionary <string, object>(StringComparer.OrdinalIgnoreCase); HtmlAttributes.Merge(column.HtmlAttributes); }
public GridCell <T> CreateCellFor(GridColumnBase <T> column) { var cell = new GridCell <T>(column, DataItem) { #if MVC2 || MVC3 InEditMode = InEditMode, InInsertMode = InInsertMode, #endif Selected = Selected }; if (column.Template != null) { cell.Template.CodeBlockTemplate = column.Template; } if (column.InlineTemplate != null) { cell.Template.InlineTemplate = column.InlineTemplate; } return(cell); }