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
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
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?
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
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
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
Hello Eyup
could not attach the project, link on dropbox
https://www.dropbox.com/s/sulypzbxcvw9nb5/KendoExample.zip?dl=0
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
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
You can achieve this requirement using a general event for the entire grid:
.Events(e=>e.FilterMenuInit(
"gridFilterInit"
))
<script>
function
gridFilterInit(args) {
$(
".k-filter-menu li.k-item:contains('Is')"
).hide();
}
</script>
That should do the trick.
Regards,
Eyup
Telerik by Progress
Hi Eyup,
Thanks for your help, the problem is solved.