public static HtmlGrid <T> Grid <T>(this HtmlHelper helper, Grid <T> sourceGrid, string viewName) where T : class { //wrap source grid: var htmlGrid = new HtmlGrid <T>(sourceGrid, helper.ViewContext, viewName); return(htmlGrid); }
public static HtmlGrid <T> Grid <T>(this IHtmlHelper helper, Grid <T> sourceGrid) where T : class { //wrap source grid: var htmlGrid = new HtmlGrid <T>(sourceGrid, helper, helper.ViewContext, DefaultPartialViewName); return(htmlGrid); }
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); }