如何更改剃刀中剑道网格的可分页消息?

问题描述 投票:0回答:3

我在javascript中找到了,但我无法做到。
谁能说一下剃须刀中的“显示”如何?

pageable: {
    messages: {
        display: "{0} - {1} of {2} items", //{0} is the index of the first record on the page, {1} - index of the last record on the page, {2} is the total amount of records
        empty: "No items to display",
        page: "Page",
        of: "of {0}", //{0} is total amount of pages
        itemsPerPage: "items per page",
        first: "Go to the first page",
        previous: "Go to the previous page",
        next: "Go to the next page",
        last: "Go to the last page",
        refresh: "Refresh"
    }
}

剃须刀视图

.Pageable(??)
javascript asp.net-mvc razor kendo-ui kendo-grid
3个回答
10
投票

看看这里

   @(Html.Kendo().Grid(Model)
        .Name("grid")
        .Pageable(pager => pager
            .Messages(messages => messages.Display("Showing items from {0} to {1}. Total items: {2}"))
        )
        .DataSource(dataSource => dataSource
            .Ajax() // or Server()
            .Read(read => read.Action("Products_Read", "Home"))
        )
     )

3
投票

只是为了在之前的答案的基础上再做一些补充。

.Messages(message => message.ItemsPerPage("ItemsPerPage"))
                    .Messages(message => message.Page("Page"))
                    .Messages(message => message.Of("Of"))
                    .Messages(message => message.Display("Display"))
                    .Messages(message => message.Empty("Empty"))
                    .Messages(message => message.First("First"))
                    .Messages(message => message.Last("Last"))
                    .Messages(message => message.Next("Next"))
                    .Messages(message => message.Previous("Previous"))
                    .Messages(message => message.Refresh("Refresh"))

-1
投票

嗨如何添加网格顶部和底部的可分页位置..

© www.soinside.com 2019 - 2024. All rights reserved.