asp.net mvc - Kendo globalization: different cultures for widgets -
asp.net mvc - Kendo globalization: different cultures for widgets -
i have kendo grid
incell
editing mode , decimal
column rate
.
@(html.kendo().grid(model.contractcurrencyclauses) .name("contractcurrencyclauses") .columns(columns => { columns.bound(p => p.rate).clienttemplate("...").width(200); }) .editable(editable => editable.mode(grideditmode.incell)) .datasource(datasource => datasource.ajax() .model(model => { model.id(u => u.contract_id); }) .serveroperation(false)))
the problem when submitted form, got null
rate
if floating point number because of regional settings on pc, in case of integer ok. solved issue adding globalization in web.config:
<globalization culture="en-us" uiculture="ru-ru" />
but en-us
civilization affects kendo widgets, kendo datepicker
. tried apply ru-ru
civilization or format datepicker editor template, not work:
@model datetime? <script src="~/scripts/kendo/cultures/kendo.culture.ru-ru.min.js"></script> @(html.kendo().datepickerfor(m => m).culture("ru-ru").format("dd.mm.yyyy"))
so, how can apply en-us
civilization kendo grid
only?
thanks lot.
you can utilize like
<script> kendo.culture("en-gb"); var civilization = kendo.culture(); culture.calendar.patterns.d = "dd mmm yyyy"; // short date pattern culture.calendar.patterns.d = "dd mmm yyyy"; // long date pattern culture.calendar.patterns.t = "hh:mm"; // short time pattern culture.calendar.patterns.t = "hh:mm"; // long time pattern culture.calendar.patterns.g = "dd mmm yyyy hh:mm"; culture.calendar.patterns.g = "dd mmm yyyy hh:mm"; culture.numberformat.currency.symbol = "$"; </script>
and can format number , decimals also.
hope help you
asp.net-mvc kendo-ui globalization kendo-asp.net-mvc culture
Comments
Post a Comment