public static HtmlString Grid <TModel, TValue, TSearch>(this IHtmlHelper <TModel> html, string gridName, string url, string pagesCountUrl, string areaName, bool showEdit, bool ShowDelete, bool showPaging, bool initiateGrid, string gridObjectName, AwroGridPagingType pagingType, Dictionary <string, bool> showIfParameters)
        {
            var properties = typeof(TValue).GetProperties().ToArray();

            url = updateUrl(html, url, areaName);
            var    countUrl  = string.IsNullOrEmpty(pagesCountUrl) ? getPagesCountUrl(html, areaName) : pagesCountUrl;
            var    deleteUrl = getDeleteUrl(html, areaName);
            string result    = renderGrid(gridName, showEdit, ShowDelete, showPaging, initiateGrid, gridObjectName, typeof(TSearch), properties, url, countUrl, deleteUrl);

            return(new HtmlString(result));
        }
Exemplo n.º 2
0
 public HtmlString Grid <TValue, TSearch>(string gridName, string url = null, string pagesCountUrl = null, string areaName = null, bool showEdit = true, bool showDelete = true, bool showPaging = true, bool initiateGrid = true, string parentObjectName = null, AwroGridPagingType pagingType = AwroGridPagingType.ServerSide, Dictionary <string, bool> showIfParameters = null)
 {
     return(GridExtension.Grid <TModel, TValue>(_html, gridName, url, pagesCountUrl, areaName, showEdit, showDelete, showPaging, initiateGrid, parentObjectName, pagingType, showIfParameters));
 }