如何改变剑道电网分页消息的剃须刀? [英] How to change pageable messages of kendo grid in razor?

查看:136
本文介绍了如何改变剑道电网分页消息的剃须刀?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在javascript中找到,但我便无法管理这样做。结果
任何人都可以说显示怎么会在剃刀?

 分页:{
    消息:{
        显示:{0} - {1} {2}项目,// {0}是第一个记录的页面索引,{1} - 在页面上的最后一个记录的索引,{2}是总记录量
        空:没有条款显示
        页:页面
        道:{0},// {0}页总量
        itemsPerPage:项目每页
        第一:转到第一页,
        previous:去previous页
        下一篇:转到下一页,
        最后:转到最后一页,
        刷新:刷新
    }
}

的Razor视图

  .Pageable(??)


解决方案

在看一看<一个href=\"http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/configuration#messages\">here.

  @(Html.Kendo()。网格(模型)
        。名称(网格)
        .Pageable(寻呼机=&GT;寻呼机
            .Messages(消息= GT; messages.Display(显示,从项目{0} {1}总笔数:{2}))
        )
        .DataSource(数据源=&GT;数据源
            阿贾克斯()//或服务器()
            .Read(读=&GT; read.Action(Products_Read,家))
        )
     )

I found in javascript but i could't manage to do it.
Can anyone say how "display" will be in 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(??)

解决方案

Have a look at 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"))
        )
     )

这篇关于如何改变剑道电网分页消息的剃须刀?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆