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

Grid mvc filter settings not work with localization

13 Answers 401 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 20 Dec 2016, 01:46 PM

Hi, version kendo ui 2016.3.1118, using Russian localization (Turkish works equally) the setting:

.Filterable(filterable => filterable
        .Extra(false)
        .Operators(operators => operators
            .ForString(str => str.Clear()
                .StartsWith("Starts with")
                .IsEqualTo("Is equal to")
                .IsNotEqualTo("Is not equal to")
            ))
        )

simply does not work, instead of the three operators (specified in settings) displays all.  If you include the localization of the default(en-EN) is all works.
Full Code:

bundles.Add(new ScriptBundle("~/bundles/kendoJs").Include("~/Scripts/kendo/2016.3.1118/kendo.all.min.js")
                                                             .Include("~/Scripts/kendo/2016.3.1118/kendo.aspnetmvc.min.js")
                                                             .Include("~/Scripts/kendo/2016.3.1118/cultures/kendo.culture.ru-RU.min.js"));
<system.web>
    <globalizationculture="ru-Ru" uiCulture="ru-Ru" />
</system.web>
kendo.culture("ru-RU");
 @(Html.Kendo().Grid<CertificateDeath>()
    .Name("Grid")
    .Columns(columns =>  {
       columns.Bound(e => e.Name).Width(200);
        columns.Bound(e => e.NameShort).Width(350);
    })
    .Filterable(filterable => filterable
        .Extra(false)
        .Operators(operators => operators
            .ForString(str => str.Clear()
                .StartsWith("Starts with")
                .IsEqualTo("Is equal to")
                .IsNotEqualTo("Is not equal to")
            ))
        )
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("List", "CertificateDeath"))
     )
    )
I would be grateful for any help.

13 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 22 Dec 2016, 01:34 PM
Hello,

I have tested the grid globalization in the demo below and after I selected Russian culture it applies properly for the filter settings:
http://demos.telerik.com/aspnet-mvc/grid/globalization?culture=ru-RU

Please check it out and see what is the difference on your end.

Regards,
Pavlina
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Sergey
Top achievements
Rank 1
answered on 23 Dec 2016, 05:33 AM

Hello Pavlina,

http://screencast.com/t/2x50rrrjN8m

For russia culture not working "settings operators filter" and not the filter itself. In the settings have three operators for the data type "string", but why display all operators?

0
Eyup
Telerik team
answered on 26 Dec 2016, 04:00 PM
Hello Sergey,

As for the localization issue, generally the grid component provides globalization:
http://demos.telerik.com/kendo-ui/grid/localization

They are controlled by the grid messages:
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-filterable.operators.string.isnull

You can also check the following article:
http://docs.telerik.com/kendo-ui/framework/localization/overview


In your specific case it might be due to some general localization which you use and overrides these properties.

Regards,
Eyup
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Sergey
Top achievements
Rank 1
answered on 27 Dec 2016, 12:24 PM

Hello Eyup, 

Links that you sent I read otherwise would not write to the forum. If you use javascript all work but not work for mvc helper

http://www.screencast.com/t/2x50rrrjN8m

0
Eyup
Telerik team
answered on 29 Dec 2016, 12:14 PM
Hello Sergey,

In that case please modify the attached web site sample to demonstrate the exact problematic behavior and send it back to us so we can provide a solid and accurate solution.

Regards,
Eyup
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Sergey
Top achievements
Rank 1
answered on 09 Jan 2017, 01:07 PM

Hello Eyup

could not attach the project, link on dropbox

https://www.dropbox.com/s/sulypzbxcvw9nb5/KendoExample.zip?dl=0

0
Sergey
Top achievements
Rank 1
answered on 16 Jan 2017, 08:02 AM
Can somebody help me?
0
Pavlina
Telerik team
answered on 18 Jan 2017, 01:04 PM
Hi,

Thank you for the provided project. We will give it a try and will get back to you with our findings as soon as possible. 

Regards,
Pavlina
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Sergey
Top achievements
Rank 1
answered on 27 Jan 2017, 01:51 PM
Can somebody help me?
1
Eyup
Telerik team
answered on 30 Jan 2017, 06:10 PM
Hi Sergey,

Thanks for your immense patience about this matter. From now on, I am taking this case as a top priority and I will provide you almost instant replies so we can finish this project as quick as possible.

You can resolve this behavior by applying this configuration directly to the column:
columns.Bound(e => e.ProductName).Width(200).Filterable(f => f
        .Extra(false)
        .Operators(operators => operators
        .ForString(str => str.Clear()
           .StartsWith("Начинается")
           .IsEqualTo("Равно")
           .IsNotEqualTo("Не равно"))
));

I've updated your Telerik points as a token of gratitute for bringing this issue to our attention. I will also forward this issue to our dev team for further investigation.

Thank you once again for your understanding.

Regards,
Eyup
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Sergey
Top achievements
Rank 1
answered on 07 Feb 2017, 07:27 AM
Thank Eyup, for having paid attention to my problem. In this case, it does not solve the problem because I have a few GRID with large number of fields. Can I exclude these operators (not enumerating all that I need) https://www.screencast.com/t/XgHondh1XNpN and by applying this configuration directly to grid  or make globalization for this operator?  
0
Accepted
Eyup
Telerik team
answered on 09 Feb 2017, 06:18 AM
Hello Sergey,

You can achieve this requirement using a general event for the entire grid:
.Events(e=>e.FilterMenuInit("gridFilterInit"))
JavaScript:
<script>
    function gridFilterInit(args) {
        $(".k-filter-menu li.k-item:contains('Is')").hide();
    }
</script>

That should do the trick.

Regards,
Eyup
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Sergey
Top achievements
Rank 1
answered on 15 Feb 2017, 11:24 AM

Hi Eyup,

Thanks for your help, the problem is solved.

Tags
Grid
Asked by
Sergey
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Sergey
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or