This is a migrated thread and some comments may be shown as answers.

Issues with filters and localization

1 Answer 476 Views
Grid
This is a migrated thread and some comments may be shown as answers.
R E
Top achievements
Rank 1
R E asked on 22 Jun 2016, 04:08 AM

Hi,

I'm developing a large industry SPA portal on AngularJS and faced several issues with Grid filtering:

1. Column template supports AngularJS directives, but column filter "itemTemplate" isn't:

                   template: "<the-column value='#= TheColumnValue #'></the-column>",
                   filterable:
                    {
                        multi: true,
                        itemTemplate: function(e) {

                            // some conditions here
                            return "<the-column-filter></the-column-filter>";
                        }
                    }

In this code snippet GridColumn's template field works as expected (directive the-column is recognized), but the-column-filter directive, referenced in filter itemTemplate is not recognized and just ignored.

Even worse is that if I started providing filterable option, localization in this specific column resets to default language (en-US):

http://take.ms/Byorr

2. Another localization problem reproduced with "Is null" and "Is not null" operators. As opposed to other operators, these two have no translations to RU:

http://take.ms/zj2rV

But when I tried to provide my own translations for them, other criterias just disappeared:

http://take.ms/Q6wL2

Please, give me a hint to workaround these problems or fix them if possible.

Thank you

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 24 Jun 2016, 10:44 AM

Hello R E,

Please find the answers to your questions below:

1) The Kendo UI Grid Columns filter menu item template can be customized with a Kendo UI Template and filter messages as required. I have prepared a sample demo available at: http://dojo.telerik.com/osOka

Documentation references for Kendo UI Template that you may find useful:

- overview
http://docs.telerik.com/kendo-ui/framework/templates/overview

-API reference
http://docs.telerik.com/kendo-ui/api/javascript/kendo#methods-template

2) The current Kendo UI Grid filter menu messages in Russian RU are available at:

https://github.com/telerik/kendo-ui-core/blob/524e3a1ae1f3d6e6443c6f354d529de74d20ec49/src/messages/kendo.messages.ru-RU.js#L205

We welcome contributors to our open source Kendo UI Core Repository,please feel free to add any missing options with a pull request - here is how to contribute:

https://github.com/telerik/kendo-ui-core#how-to-contribute

3) Omitting a filterable operator will remove it as an option as outlined at:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-filterable.operators.string

To have the complete set of options, they should be added manually(see the filter menu of the LastName column in my example)

4) For custom Kendo UI Grid Filter messages, please configure the relevant ones in your scenario, otherwise the en-US messages will be used. Documentation reference:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-filterable.messages  

Please let me know if you need any further help.

Regards,
Alex
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
R E
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or