public IHtmlNode Create(GridPagerData pagerSection)
        {
            var firstItemInPage = pagerSection.Total > 0 ? (pagerSection.CurrentPage - 1) * pagerSection.PageSize + 1 : 0;
            var lastItemInPage = Math.Min(pagerSection.PageSize*pagerSection.CurrentPage, pagerSection.Total);

            var itemsText = pagerSection.DisplayingItemsText ?? string.Empty;
            return new HtmlElement("div")
                        .AddClass("t-status-text")
                        .Text(itemsText.FormatWith(firstItemInPage, lastItemInPage, pagerSection.Total));
        }
        public IHtmlNode Create(GridPagerData section)
        {
            var div = new HtmlElement("div")
                .AddClass("t-page-i-of-n");

            var page = new LiteralNode(section.PageText);

            page.AppendTo(div);

            var input = new HtmlElement("input", TagRenderMode.SelfClosing)
                .Attribute("type", "text")
                .Attribute("value", section.CurrentPage.ToString());

            input.AppendTo(div);

            var of = new LiteralNode(string.Format(section.PageOfText, section.PageCount));

            of.AppendTo(div);

            return div;
        }
 public IHtmlNode CreateRefreshButton(GridPagerData pagerData)
 {
     return pagerBuilder.CreateRefreshButton(pagerData);
 }
 public IHtmlNode CreatePager(GridPagerData pagerData)
 {
     return pagerBuilder.Create(pagerData);
 }
Esempio n. 5
0
 protected virtual IHtmlNode CreateRefreshButton(GridPagerData pagerData)
 {
     return FunctionalSectionBuilder.CreateRefreshButton(pagerData);
 }
Esempio n. 6
0
 protected virtual IHtmlNode CreateBottomPager(GridPagerData pagerData)
 {
     return FunctionalSectionBuilder.CreatePager(pagerData);
 }
Esempio n. 7
0
 protected void AppendRefreshButton(IHtmlNode div, GridPagerData pagerData)
 {
     var button = CreateRefreshButton(pagerData);
     button.AppendTo(div);
 }