Esempio n. 1
0
        public GridHtmlRenderer(GridRenderContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            this.context = context;
            rowRendererFactory = new GridRowRendererFactory();
            headerRendererFactory = new GridHeaderRendererFactory();
        }
 public IGridHeaderHtmlRenderer CreateRenderer(GridRenderContext context)
 {
     return new GridHeaderHtmlRenderer(context.Columns.Where(column => column.Visible).Select(column => column.CreateHeaderCellRenderer(context.HtmlHelper)));
 }
Esempio n. 3
0
 public virtual IGridRowHtmlRenderer CreateRowRenderer(GridRenderContext context, GridRow row)
 {
     return new GridRowHtmlRenderer(row.DataItem, context.Columns.Where(column => column.Visible).Select(column => cellRendrerFactory.CreateCell(column, context.HtmlHelper)));
 }