public IHtmlNode Create(GridPagerData section)
        {
            var span = new HtmlElement("span")
                .AddClass("k-pager-sizes", "k-label");

            var select = new HtmlElement("select")
                .AppendTo(span);

            foreach (var pageSize in section.PageSizes)
            {
                var pageSizeText = pageSize.ToString().ToLowerInvariant();
                var pageSizeValue = pageSizeText;

                if (pageSizeText == "all")
                {
                    pageSizeText = section.Messages.AllPages;
                }

                new HtmlElement("option").Attribute("value", pageSizeValue).Text(pageSizeText).AppendTo(select);
            }

            new LiteralNode(section.Messages.ItemsPerPage).AppendTo(span);

            return span;
        }
        public IHtmlNode Create(GridPagerData pager)
        {
            var firstItemInPage = pager.Total > 0 ? (pager.Page - 1) * pager.PageSize + 1 : 0;
            var lastItemInPage = Math.Min(pager.PageSize * pager.Page, pager.Total);

            return new HtmlElement("span")
                        .AddClass("k-pager-info", "k-label")
                        .Text(pager.Messages.Display.FormatWith(firstItemInPage, lastItemInPage, pager.Total));
        }
        public IHtmlNode Create(GridPagerData pager)
        {
            var firstItemInPage = pager.Total > 0 ? (pager.Page - 1) * pager.PageSize + 1 : 0;
            var lastItemInPage  = Math.Min(pager.PageSize * pager.Page, pager.Total);

            return(new HtmlElement("span")
                   .AddClass("k-pager-info", "k-label")
                   .Text(pager.Messages.Display.FormatWith(firstItemInPage, lastItemInPage, pager.Total)));
        }
        public IHtmlNode Create(GridPagerData section)
        {
            var span = new HtmlElement("span")
                .AddClass("k-pager-sizes", "k-label");

            var select = new HtmlElement("select")
                .AppendTo(span);

            foreach (var pageSize in section.PageSizes)
            {
                new HtmlElement("option").Text(pageSize.ToString(CultureInfo.InvariantCulture)).AppendTo(select);
            }

            new LiteralNode(section.Messages.ItemsPerPage).AppendTo(span);

            return span;
        }
Beispiel #5
0
        public IHtmlNode Create(GridPagerData section)
        {
            var span = new HtmlElement("span")
                       .AddClass("k-pager-sizes", "k-label");

            var select = new HtmlElement("select")
                         .AppendTo(span);

            foreach (var pageSize in section.PageSizes)
            {
                new HtmlElement("option").Text(pageSize.ToString(CultureInfo.InvariantCulture)).AppendTo(select);
            }

            new LiteralNode(section.Messages.ItemsPerPage).AppendTo(span);

            return(span);
        }
        public IHtmlNode Create(GridPagerData section)
        {
            var span = new HtmlElement("span")
                .AddClass("k-pager-input", "k-label");

            var page = new LiteralNode(section.Messages.Page);

            page.AppendTo(span);

            var input = new HtmlElement("input", TagRenderMode.SelfClosing)
                .Attribute("type", "text")
                .AddClass("k-textbox")
                .Attribute("value", section.Page.ToString());

            input.AppendTo(span);

            var of = new LiteralNode(string.Format(section.Messages.Of, section.TotalPages));

            of.AppendTo(span);

            return span;
        }
Beispiel #7
0
        public IHtmlNode Create(GridPagerData section)
        {
            var span = new HtmlElement("span")
                       .AddClass("k-pager-input", "k-label");

            var page = new LiteralNode(section.Messages.Page);

            page.AppendTo(span);

            var input = new HtmlElement("input", TagRenderMode.SelfClosing)
                        .Attribute("type", "text")
                        .AddClass("k-textbox")
                        .Attribute("value", section.Page.ToString());

            input.AppendTo(span);

            var of = new LiteralNode(string.Format(section.Messages.Of, section.TotalPages));

            of.AppendTo(span);

            return(span);
        }
Beispiel #8
0
 protected virtual IHtmlNode CreateBottomPager(GridPagerData pagerData)
 {
     return(FunctionalSectionBuilder.CreatePager(pagerData));
 }
Beispiel #9
0
 public IHtmlNode CreatePager(GridPagerData pagerData)
 {
     return(pagerBuilder.Create(pagerData));
 }
Beispiel #10
0
 protected virtual IHtmlNode CreateBottomPager(GridPagerData pagerData)
 {
     return FunctionalSectionBuilder.CreatePager(pagerData);
 }
 public IHtmlNode CreatePager(GridPagerData pagerData)
 {
     return pagerBuilder.Create(pagerData);
 }