Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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);
        }