javascript - 如何更改 Razor 中剑道网格的可分页消息?

标签 javascript asp.net-mvc razor kendo-ui kendo-grid

我在 javascript 中找到了,但我做不到。
谁能说说 Razor 的“显示”效果如何?

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"
    }
}

Razor View

.Pageable(??)

最佳答案

看看here .

   @(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"))
        )
     )

关于javascript - 如何更改 Razor 中剑道网格的可分页消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20685860/

相关文章:

c# - “Illegal characters in path.” 仅当从移动浏览器查看时

asp.net-mvc - 在 MVC 应用程序中获取访问 token

razor - 寻找在控制台应用程序中渲染 Razor cshtml 页面的最简单选项,无需任何 Web 服务器

c# - 如何验证字段不为空

javascript - 使用 jQuery 滚动到顶部按钮在 Safari v.7.0.5 中不起作用?

javascript - 使用 Javascript 移动 DOM 对象

asp.net-mvc - 在 Visual Studio 2010 SP1 中复制和粘贴 Razor 标记非常慢

css - MVC jquery mobile 在加载时不占用整个页面宽度

javascript - 使用 ActiveX DeleteFile 时权限被拒绝

javascript - 将字符串列表从 Django 传递到 Javascript