Exemple #1
0
        public static HtmlGrid <T> Grid <T>(this HtmlHelper helper, IEnumerable <T> items,
                                            GridRenderOptions renderOptions)
            where T : class
        {
            var newGrid = new Grid <T>(items.AsQueryable());

            newGrid.RenderOptions = renderOptions;
            var htmlGrid = new HtmlGrid <T>(newGrid, helper.ViewContext, renderOptions.ViewName);

            return(htmlGrid);
        }
Exemple #2
0
 public static HtmlGrid <T> Grid <T>(this HtmlHelper helper, IEnumerable <T> items, string viewName)
     where T : class
 {
     return(Grid(helper, items, GridRenderOptions.Create(string.Empty, viewName)));
 }