2014-10-15 4 views
0

Я бы хотел перевести элементы фильтра в сетку пользовательского интерфейса Kendo, это означает Сортировать по возрастанию, равно и т. Д. (См. Ниже).Kendo Grid, как перевести выпадающий фильтр?

enter image description here

Я пытался найти его в Official Кендо Сетка документации, но без удачи.

Как я могу это сделать?

Спасибо за любую помощь.

Edit:

Я попробовал этим способом, но он работает только для информации этикетке:

filterable: { 
     mode: "row", 
     messages: { 
      info: 'enter what you want here:', 
      equals: 'enter what you want here:' 
     } 
    }, 

ответ

2

Попробуйте это:

Razor:

@(Html.Kendo().Grid(Model) 
    .Name("listView") 
    .Filterable(f => f.Messages(m => m.Equals("text here")) 

Javascript:

$("#grid").kendoGrid({ 

    filterable: { 
     messages: { 
      info: 'enter what you want here:', 
      and: 'enter what you want here:', 
      cancel: 'enter what you want here:', 
      clear: 'enter what you want here:', 
      filter: 'enter what you want here:', 
      isFalse: 'enter what you want here:', 
      isTrue: 'enter what you want here:', 
      operator: 'enter what you want here:', 
      or: 'enter what you want here:', 
      selectValue: 'enter what you want here:', 
      value: 'enter what you want here:', 
      operators: { 
       string: { 
        eq: "enter what you want here:", 
        neq: "enter what you want here:", 
        startswith: "enter what you want here:", 
        contains: "enter what you want here:", 
        doesnotcontain: "enter what you want here:", 
        endswith: "enter what you want here:", 
        eq: "enter what you want here:", 
        neq: "enter what you want here:" 
        } 
      } 
     } 
    } 
}); 
+0

Информация работает, не равно. – redrom

+0

Отметьте новый ответ – chiapa

+0

Все еще без успеха. – redrom

0
filterable: { 
    messages: { 
     info: "Custom header text:", // sets the text on top of the Filter menu 
     filter: "CustomFilter", // sets the text for the "Filter" button 
     clear: "CustomClear", // sets the text for the "Clear" button 

     // when filtering boolean numbers 
     isTrue: "custom is true", // sets the text for "isTrue" radio button 
     isFalse: "custom is false", // sets the text for "isFalse" radio button 

     //changes the text of the "And" and "Or" of the Filter menu 
     and: "CustomAnd", 
     or: "CustomOr" 
    }, 
    operators: { 
     //filter menu for "string" type columns 
     string: { 
      eq: "Custom Equal to", 
      neq: "Custom Not equal to", 
      startswith: "Custom Starts with", 
      contains: "Custom Contains", 
      endswith: "Custom Ends with" 
     }, 
     //filter menu for "number" type columns 
     number: { 
      eq: "Custom Equal to", 
      neq: "Custom Not equal to", 
      gte: "Custom Is greater than or equal to", 
      gt: "Custom Is greater than", 
      lte: "Custom Is less than or equal to", 
      lt: "Custom Is less than" 
     }, 
     //filter menu for "date" type columns 
     date: { 
      eq: "Custom Equal to", 
      neq: "Custom Not equal to", 
      gte: "Custom Is after or equal to", 
      gt: "Custom Is after", 
      lte: "Custom Is before or equal to", 
      lt: "Custom Is before" 
     }, 
     //filter menu for foreign key values 
     enums: { 
      eq: "custom Is Equal to", 
      neq: "custom Is Not equal to" 
     } 
    } 
} 

http://docs.telerik.com/kendo-ui/controls/data-management/grid/localization