【问题标题】:Kendo ASP.NET MVC Grid Pageable() attributes combinationKendo ASP.NET MVC Grid Pageable() 属性组合
【发布时间】:2020-11-09 19:34:55
【问题描述】:

检查下面的两行Pageable() 代码,如何将它们组合成一条指令?

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
    .Name("Grid")  
    ...         
    .Pageable(p => p.PageSizes(new int[] { 10, 20, 50, 100 }).Info(true)) // 1st
    .Pageable(p => p.AlwaysVisible(false))                                // 2nd
    .DataSource(dataSource => dataSource
       .Ajax()
       .PageSize(15)
       ...
   )
)

【问题讨论】:

    标签: c# asp.net asp.net-mvc visual-studio kendo-ui


    【解决方案1】:
    @(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
        .Name("Grid")  
        ...         
        .Pageable(p => p.AlwaysVisible(false).PageSizes(new int[] { 10, 20, 50, 100 }).Info(true))
        .DataSource(dataSource => dataSource
           .Ajax()
           .PageSize(15)
           ...
       )
    )
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-23
      • 2014-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-23
      • 2013-08-06
      • 1970-01-01
      相关资源
      最近更新 更多