Kendo UI:通过asp.net进行网格本地化mvc

问题描述:

有什么方法可以从ASP.NET MVC代码为Kendo UI Grid设置新消息吗?我坚持使用Kendo.Mvc.UI.Fluent.FilterableMessagesBuilder对象,我需要传递给消息方法。 那么我应该通过Messages方法来更改值?Kendo UI:通过asp.net进行网格本地化mvc

@(

Html.Kendo().Grid(Model) 
    .Name("Grid") 
    .Columns(col => 
    { 
     col.Bound(p => p.Id); 
     col.Bound(p => p.FirstName); 
     col.Bound(p => p.LastName); 
     col.Bound(p => p.Address); 
     col.Bound(p => p.Zip); 
    }) 

    .Pageable() 
    .Sortable() 
    .Scrollable() 
    .Filterable(filter => filter.Messages(Kendo.Mvc.UI.Fluent.FilterableMessagesBuilder 
    .DataSource(dataSource => dataSource 
     .Ajax() 
     .ServerOperation(false) 
    ) 
) 

 .Filterable(filterable => filterable.Messages(messages => 
     { 
      messages.Info("Custom header text"); // sets the text on top of the filter menu 
      messages.Filter("CustomFilter"); // sets the text for the "Filter" button 
      messages.Clear("CustomClear"); // sets the text for the "Clear" button 
     })) 

请看看剑道的文档(搜索过滤器菜单的本地化)

Localization of the filter menu

+0

谢谢,我看过的文档,但没有用于ASP.NET CSHTML没有例子编码风格。 – 2013-04-25 09:41:52